Huge lag spikes on player join

Hello,
I have recently noticed Lag Spikes of all players within the server whenever a new player enters any the
server.

I’ve tried disabling every single script and the lag spike keeps showing up.

I tried to enable “StreamingEnable” and the result reduced the lag spike from 60.000kb / s to 6.000kb / s on a single player server.

This is what happens on a server with 17 people with “StreamingEnable” disabled

Try checking your plugins or any viruses.

Do you have a lot of parts? Consider using Union to make parts which have same properties one whole part.

I disabled them all, the problem was still there.

The map is pretty big, so I’d say yea. But it doesn’t make sense.

The spike happens when a new player joins, how does it make whole server lagging just because the map is big?

This depends on the amount of triangales or functions that have been launched to the server. Using unions would help, but you should also optimize your scripts and even don’t use too much Lights(this is one of the most lag producers). If you want to optimize your game, I’d recommend decreasing the amount of instances and objects inside your project.

About the scripts part, I disabled every single script in the game and the spike was still there.

I understand the amount of parts can lag the server, but it should lag it always, not only when a new player joins. That’s my logic, tell me if I am wrong.

Check what plugins you are using, some of them may send a lot of instances or scripts to your game that may cause lag.

Don’t mind Mizaru, it was just a test I was doing.

Do you make the game with someone else that uses plugins?

Yea, should I try asking them to disable all their plugin and test?

Check each of them, maybe one has a virus that causes all your problems

That won’t help, unions are not nearly as efficient as parts nor meshparts. If you have parts, don’t even try to make them into unions, they’re not really useful anymore.

About the topic, inspect each single piece of your game, if you suspect from a specific thing like the map or the lights lagging the thing out, just take them out to another test place and if the lag is still there, well, at least it is not a virus and just a performance problem from you.

I’ll try and let you know.

Thank you all for your time, much appreciated!

Do you have any scripts in StarterPlayerScripts? Maybe some code there could be a virus infecting your game … maybe even free models?

I disabled everything with a command, lag spike was still there.

What functions do you execute on game.Players.PlayerAdded? That might be a cause for the lag if you do a lot on the server.

It’s not my scripts.

I found this in the console.

That’s the cause most likely

Huh, that’s pretty interesting. Not sure what to think about that…

Are any parts unanchored? Or this could also be because you have a lower end computer which can’t handle your map size and assets. One thing you can do is request someone to try it out and see if they have the same problem. If they do not get the same result, then it is your computer’s problem. If they do, then maybe make some adjustments to map size.