I wanna know how to keep the script from continuing until a certain variable is true, how would I do this?
✓ ANSWER ACCEPTED
How would you pause a script?
1 answer
✓ Accepted answer
Simply repeatedly wait() until the value is true.
I love repeat loops, they translate to English so well. What we're basically doing is telling the computer to repeat the wait() function until the condition is met.
local value = true
--Will wait until value equals true
repeat wait() until value
--Will wait until value equals false
repeat wait() until not value
1 comment
0
Thanks!!!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
while not var do wait(.2) end