Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I send a script back to the beginning?

I want basically the same effect as disabling and enabling the script, but done from one script. How do I do this?

2 answers

Do your research.


What you're looking for is a loop. What type of loop depends on what your code is. To continuously repeat something, you should use a while loop. A while loop will repeat a block of code until the condition between the while and do keywords is false. If you give it a condition that will never, ever be false, it will loop forever.

In infinite loops, you must have at least a wait(0) somewhere in it, or the server will crash.

while true do
	wait()
	print("Spamming your output...")
end

This is not a request site, please try doing some personal research, or check out the wiki. Once you semi-find out what to do, and you get errors post them here and we will do our best to help.

2 comments

0

Did you even read the question? This is not asking for a script at all. I am asking for a command, not some intricate script. If something like this does not exist then you could just say that, Google and the wiki both return nothing.

0

In this case, his question is valid. He's asking how he should go about doing something lua-specific.

This discussion is preserved as it was. New answers, comments, and votes are closed.