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

How would I restart a script without using more than one script?

Asked by
Galicate 106
6 years ago

I want to know how to restart a script. I though that maybe if i disabled the script then enabled it, that would work, but i would need a second script to test when that script is disabled then re enable it. I am confused on how I would restart a script.

0
You could use a while loop and when it hits the end of the loop it returns to the top GottaHaveAFunTime 218 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

add this:

while true do

-- insert your code here --

wait() -- keep this here unless you have a delay already, this is to prevent crashing

end
Ad

Answer this question