Okay thanks, it somehow helped, can roblox literally freeze by running an empty loop over and over? because everything inside the while true do was in an if statement and 100% of those had a wait()
Did you say that the wait()
was inside an if statement? If that is the case, the wait()
won’t be run at all if the condition to the if statement doesn’t apply. Try putting a wait()
at the end of the while loop, outside the if statement.
Yeah I did that and it worked already, was wondering, can roblox literaly freeze on an empty while true do?
Yes, roblox can freeze if a while loop was running continuously without a delay. This post has a helpful reply that explains what a script timeout is.
Yes, and if it does freeze, make sure to open a recovery file that should pop up when you start up Studio again, or you’ll probably lose all your progress you had since the last save.
it was player that froze not studio, but it’s fixed by adding a wait(0.2)
Oh. Well you will forget to add a wait sometime when creating a loop (i literally did that yesterday) so when that happens make sure to use the recovery file. It can save you alot of time.
Also i don’t think you need the ‘0.2’, just a wait() should do it.
Oh, okay thanks for the tip – 30 char ://