How to stop server lag

Hey everyone, i have a open world game, and it has a very long map sort of like dusty trip, and it spawns mobs around players. (about a 80 stud radius)

And in playtests with about 5 people or over the server starts severely lagging. Everything physics based becomes slow and projectiles from projectile modules become choppy. I already done some server culling stuff. Im at a loss for what to do

You’ll have to find out whats causing the lag, simply guessing will only work to a certain extent.

Check script activity, check microprofiler, use all the random tools to check whats causing issues then come back and report what you found, without all that context, all you can really do is the basic optimizations of:

Client = Visuals
Server = Important stuff
and other random things that would probably just act as a bandaid without knowing the main issue.

However, there is one guess, you got too much physics stuff going on maybe :person_shrugging:

1 Like

Im pretty certain its the amount of npcs, even if it does have culling. How would i possibly make the npcs less intensive physics wise?

Disable unnecessary humanoid states, remove collisions on all limbs other than what is needed.

If possible, go further and delete every limb on the server side, then rebuild it visually on the client side, keeping what is only necessary for the character to exist on the server.

To go even further than that if you need even more optimization, just get rid of humanoids altogether and resort to making each npc just a position, and rebuild/position the character visually on the client.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.