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

while true do wont repeat?

For some reason the repeat works once.

while true do
	wait ()
	if ismove == false then --"ismove" is a Tool.Enabled setting
	StartUp()
	end
end

1 comment

0

Did you turn Enabled true again?

2 answers

✓ Accepted answer

Your loop won't repeat, as you're checking for a variable, and then activating a function. Just as the loop name implies, "while TRUE do" will only check for a true, but once it gets a false, it'll break itself to avoid unnecessary memory usage.

If you want it to work, then change the "while true do" to something like "while wait() do", and then remove the second wait.

Another error you have is that the wait() method MUSt have its parenthesis attached to it (without any spaces), not like you did in your script.

Hope this helps!

TheArmoredReaper

2 comments

0

But the word 'true' will never equal false -- therefore the loop will run eternally. Probably something in the function is incorrect or the variable is set wrong.

0

Just a note to what you said: I could do wait () if I wanted...the space does not matter

you could do

while not ismove do -- will check if ismove = false 
    wait ()
 StartUp()
end

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