Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

when im testing my server, and press play, a message comes up, and wont let me test? please help.

Asked by 6 years ago

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!

1
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. yougottols1 420 — 6y
0
If you want to override, you can check the checkbox and press continue too (: Pianotech 48 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

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.

Ad
Log in to vote
0
Answered by 6 years ago

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.

Answer this question