When I am about to test my new game I am creating in roblox studio, I press "play" a couple seconds later when it is trying to load, a message comes up, it says, "a script has been running for a long time, and may be hanging." Underneath this message it has to options, "kill script or break." I have tried both of these options several times, and my problem has not been resolved, please help me. Thank you!
when im testing my server, and press play, a message comes up, and wont let me test? please help.
2 answers
You are using a while true do loop that is running infinitely non-stop for e.g if you were changing the BrickColor of a part you would need a wait() before it changes colour again or it will crash the server. Fix - Put a wait() somewhere between 2 things that changes and enter a value inside the brackets (it's for how long it should wait it isn't essential)
EXAMPLE -
while true do
workspace.Part.BrickColor = BrickColor.new('Pearl')
wait(0.1)
workspace.Part.BrickColor = BrickColor.new('Lapis')
If you can't figure out where to put the wait give me the script and I'll reply with a more detailed answer
Hope it helped.
its because you're using a while loop or some other loop that repeats itself. put a wait in the loop because then it runs too fast for your (or anyone's) computer to handle
while true do
-- some stuff
wait(0.01)
end
i think that's the case, anyway.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
It could be because there is an error in one of your scripts and/or you are using a while loop in one of your scripts that doesn't have a :Wait(). Thus, causing a crash or making that gui pop up.
If you want to override, you can check the checkbox and press continue too (: