Lag Reduction in Game with many NPCs

  • Hello! I'm looking to reduce lag in my game, and I've searched many methods. These are some of the top hits:

    • Creating a Custom Humanoid as the ROBLOX Humanoid creates lag
    • Load NPCs client-side instead of server side
    • Use Module Scripts to control NPCs instead of individual scripts

    Does anyone have experience with this and know how effective these different strategies are? Furthermore, does anyone know of tutorials that may help with any of them? The first and second changes I'm a bit more clueless on, the third shouldn't really be a problem.


  • @ari462 Loading Npcs on the client is good like your search results said, because if the server doesn't need to see them, then do it on the client. In fact, ANYTHING that doesn't need to be on the server should be done on the client.

  • @DominusInfinitus Thank you! I really don't know where to start with this though, do you or anyone else know of a guide/tutorial that may help?

    Also another question - When I just run the game in studio, this is all run locally right? Because this seems to always lag significantly more than running the game itself or running it in the test server.

  • @ari462 I am pretty sure if you test in studio it is run locally because you are the only person in the server. SO I think your observation is correct

  • @DominusInfinitus wrong. An update was made recently "Accurate Play Solo".

  • This post is deleted!

  • @sjr04Alt oh yeah I forgot you can now switch between client and server in test mode

  • So it seems like creating custom npc's to replace humanoids is beyond my level of experience. However, I'd still like to figure out how to load the NPC's locally to reduce lag. Does anyone know a good tutorial or page that could help with this?

    I saw on the wiki something about local parts, however I want the NPC's to be there for all players. Would I go about this in the same way anyway? If not what should I do? Thank you!!

  • I'd go about tracking the location on the server and use the client to animate the parts. Someone good you could check out (Although I don't know how much he shows) is Crazyman32's work with NPCs.

    I'm not sure how many NPCs you want at a time but I would still recommend using the Humanoid. Otherwise, here's a specific video from his channel with 1k+ npcs.

Log in to reply

Looks like your connection to Scripting Helpers was lost, please wait while we try to reconnect.