Help me reduce lag from several NPCs?


  • Hello! To start I'd just like to say that I know I may get some hate from making a request for something more simple, but I've just been struggling with this, and the other parts of the game have been/will be a lot more fun for me to make.

    Anyway I'm looking to make a zombie survival game but for now I mostly want to work on reducing NPC lag. Here are some thing's I'm looking for:

    • Moving all controls and animations of npcs to 1 script -
      -- For this, I'm still trying to mess with how the pathfinding will work, so I really just want it setup so I can insert the AI into that one script for the NPCs to run on. For animations I just want the normal R6 animations.
      (The reason I don't want a normal path-finding AI is that what I want the end result to be is that if no path is found, and the NPC will go directly for the player since it is able to break down obstacles)

    • Load NPC's locally for lag reduction. Not sure exactly how this works, but through a few brief searches it seems as though the torsos should be loaded server-side to get accurate positions and then the rest is done client-side. However I'm not sure.

    • (Optional) Create custom humanoids to reduce lag of ROBLOX humanoids. I added this as optional because I am unsure of how difficult this will be. On a thread a bit further back, someone mentioned that this wasn't too challenging and that it used a lot less server resources, however I'm unsure if this would be as simple for many others.

    So this is what I'm looking for. I'm unsure of a price, but if you have an estimate and are interested let me know. Would be curious to see how much one would charge for just the first two parts, and how much more it would be with the custom humanoids added. Thanks everyone!


  • i think you should split the script into multiple scripts to stop the lag, or have waits inbetween functions and events, that might work.


  • reducing NPC lag

    :wink:


  • @TheAlphaStigma said in Help me reduce lag from several NPCs?:

    reducing NPC lag

    :wink:

    I'm confused hahaha


  • @ari462 Is your game going to be a game where multiple people will be trying to survive? If not, you don't need to worry about client and server much, but if there are many players, you can't just run all the npcs locally because lets just say that you and me were in the game. I saw a zombie spawn and started to run away or kill it. you would be confused because you wouldn't see a zombie, so you'd think I am some wild stupid crazy person trying to run away from/ or kill air.


  • @DominusInfinitus said in Help me reduce lag from several NPCs?:

    @ari462 Is your game going to be a game where multiple people will be trying to survive? If not, you don't need to worry about client and server much, but if there are many players, you can't just run all the npcs locally because lets just say that you and me were in the game. I saw a zombie spawn and started to run away or kill it. you would be confused because you wouldn't see a zombie, so you'd think I am some wild stupid crazy person trying to run away from/ or kill air.

    Ok thanks! It is multiplayer. However I thought there was a way to do this where some processes were done locally still. Looking back at the link I was going to share, I'm now thinking I misread/misunderstood something.

    Since it seems that this will no longer be possible, and there is less to do, I may attempt to do it myself again. I'll reopen this if I continue to have problems and sorry for the troubles everyone!

    However if anyone knows anything about custom humanoids for lag reduction let me know and I may still want to do this - I'm clueless on that front!


  • @ari462 Click on the emoji. :p


  • @TheAlphaStigma

    Ohh haha ok was very confused but thank you.

    Also just wanted to say I found what someone suggested in another thread (the thing I was looking for before). So they said to handle location server side but do animations on the client. Does this more sense or no?


  • @ari462 Well... I think if you play an animation in a local script it still replicates to the server because I have been making a new game and I went to roblox studio and tested it out and yes animations will still be see on the server if played on the client. They are just one of those things that replicate.


  • @TheAlphaStigma unrelated to the topic but, what the heck, why did you embed an emoji!


  • @TheAlphaStigma I am clicking on the emoji and it isn't doing anything OOF.


  • @DominusInfinitus, you're clicking on the wrong emoji. Here's the emoji they're talking about.


  • @Phlegethon5778 oh.... makes sense


  • @ari462 Just make the zombies look for players in game.Players rather than worksñace

Log in to reply
 

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