I’m making a parkour zombie game similar to dying light, and I noticed when testing in studio and playing it outside of studio that if I’m alive for too long the game starts to get really laggy and I need to reset.
The game features many scripts but all my attempts to find the issue simply didn’t work, I tried waiting until the game was laggy and going through each object to see if there was any constantly duplicating instances but that was useless and I can’t think of any other reason for why this is happening.
The game has a large emphasis on staying alive, and needing to die every 10 minutes because of lag completely undermines that.
If the FPS is the problem then you have a memory leak, this can happen if you leave connections like heartbeat or UI connections active after their not needed, because they are not broken they continue to detect input / run the loop indefinitely
Since it’s fixed by resetting, it seems to me like the problem stems from code related to the player character. Are the performance issues on the client, the server, or both? Do you have any scripts running inside the character model?