Roblox Server Disconnect

My game after an update the server starts to disconnect for everyone frequently, and I don’t understand why, I did an experiment where I tested the code

while true do end

played by server command console

and this causes the server to shut down completely, but I also don’t know if it’s this or a roblox error from the servers, still, I’m trying to find what is the loop function of my game that is causing this problem

I would like to confirm if the problem is this

1 Like

The loop you wrote does not give any time for rendering or anything else. It is likely that the script isn’t intended to infinite loop that extremely fast that it can cause the game to freeze.

I already know that this is the problem, besides I try to find which of the server/module scripts has that problem

1 Like

The easiest way to clear out the infinite loops is to look for while and repeat loops and find their trailing keywords: end and until. You can copy the lines between these and present them here.

I already did, and most have “repeat wait” or “while wait ()”

1 Like

I highly doubt that the while wait() and repeat wait() are great. They are bad practices. Couldn’t you replace them with something else or is there a reason why they are there?

like what? coroutines?
or runservice.stepped

1 Like

It depends, you’re not showing any code for anyone to work with. You should rely on the events and signals in general.