well for one if you have any tables on the server make sure to remove players data from it when they leave another is leaving instances connected, if you can you should always disconnect when OR if u only need it connected once consider using :Once. You can check if you have data leaks by opening lua heap and seeing if it is constantly rising with being GCed, u can also check if the amount of instances in game keep rising. Garbage Collection and Memory Leaks in Roblox - What you should know, also instead of making a loop to keep updating move to consider using the roblox pathfinding or you can use renderstepped instead, but u would want to do that with Collection service, u could also cache all the zombies in a table then see which zombies are in range and only send that moving data to them
2 Likes