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

A little straight-forward question related to the 'while' loop?

Sometime I see codes in the wiki like

local Allowed = true

while Allowed do

and sometimes they're like

local Allowed = false

while not Allowed do

So we see that between the 'while' and 'do' is a variable which holds a true/false statement I know that this relates to While true do so must the variable between 'while' and 'do' always be true in order for the loop to run? If so, if we putwhile Not Nil dowill it count as true?

1 answer

✓ Accepted answer

Yes, while not nil doshould work fine, but the substance of it equals that if someone get's kicked/disconnected, this function will stop. (for only the localplayer)

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