The issue is not memory related or part related. I am unsure why my game is lagging but I believe it has to do with the teleport service.
How to reproduce the issue: Whenever I shutdown a server and join a new one, whenever about 20 players join in at once, the server lags and freezes for me. I’ve tested multiple times, disabling scripts and it did not work. I even tested with a baseplate to check if there were too many parts. There isn’t a backdoor either, I checked for that. The only reason I can think of is players teleporting in and out of the game. Does anyone have any ideas or have ran into this problem before? Much appreciated, thanks!
EDIT: It seems like it is an infinite yield issue with the CoreGui, I can’t access the script though and I am not sure what is causing it to happen. It can take 5 minutes to join a server or wait until the game unfreezes. Still need help solving it.
Edit2: I don’t think the CoreGui is the reason for it happening as the freezing has happened without the error. Not sure what else it could be.
Tested the game and I didn’t had any major lag problem but some minors one. It is probably the players going in and out from the teleporter multiple times very fast which can causes lag. You could limit the player count or add some sort of player limit when they get teleported.
I am still getting the bug, I’m not allowed to post under bug reports so I’m not sure where to report the issue except for here. Infinite yield possible on StarterPlayerScripts resulting in a great increase in loading time for players.
This bug is still occurring, not sure what the cause could be. I am not getting any memory leak that would cause it. Just the infinite yield that shows up once I stop freezing (can take over 5 minutes sometimes).
That wouldn’t be the cause because I removed everything but the teleporting pad (players stand on a teleport pad, a countdown happens and it teleports them to another place) and the same lag still occurred.