So yesterday, I was struggling to find a reason why my game was so slow. They told me different ways to solve the problem, and they worked, well, sort of. The slowing down occurred again and again later and I saw that the while loop that runs every 0.1 seconds is running at 0.11, 0.12, 0.13, 0.14, etc. I was so confused why, so I decided to add the physics engine framerate into the debugging. It showed that the frame rate of the physics engine slowly turned from 60 (usual) to 53 to 45 to 32 to 13, and right now it’s at 8 frames per second. If you’re wondering, everything is normal except the fact that interacting with things has a bad delay.
The left side is the absolute wait time for wait(0.1), and the right is the frame rate of the physics engine. If you’re wondering, this only occurs when you have multiple people in the same server (max is 4). Why does this happen? What can cause the physics frame rate to slow down?
It appears that something must be cloning a part or model or something like that alot. Use the Find/Replace All tool to find the line :Clone() in all of your scripts. One of them might be in a loop.
Generally this happens when there are loads moving parts or too many parts being generated, make sure that there isn’t a vast amount of parts being generated or something like that.
I checked the lines that clone objects but they are not in an infinite loop and are not being mass generated. Also the player’s framerate isn’t low, just the physics frame rate. Also people are moving just fine. It’s just the game thats responding slow and i checked the frame rate by doing the standard fps gui coding but replace renderstepped with heartbeat