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

What happens if you do 'while nil do end'?

I've seen while true do end and while false do end, but never while nil do end, what does it do?

2 answers

Nothing because nil means it does not exist.

while true do runs if something is true

while false do runs something if it is false

while nil do does nothing because nil means something does not exist.

2 comments

0

Wow.. Never knew that, thanks for explaining it to me! +1

0

Yeah no problem glad to help, and thank you.

I kno this might be useless, and if u don't kno much about loops, don't do end, do break() for breaking the loop. end is just ending a function so it's like u tell someone to do something until they say Stop and u alk off, same here... bt, sry, my letter W doesn't ork, I need to copy and paste it...

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