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

How to use Boolean value AKA True and false?

I been trying to make an expanding and de-expanding block but i dont know how to use Boolean value AKA True and False

3 comments

2

this question doesnt make any sense

0

I answered a similar question years ago. Here's the post in case you're interested: https://scriptinghelpers.org/questions/13929/what-is-an-if-not-statement#16972 It's about the ``not` operator, but it also talks about booleans.

0

Also, please check the R wiki, as it may have the answer to your question, same w/ using the SH search engine: http://wiki.roblox.com/index.php?title=Boolean

1 answer

--declare a bool like any other variable in roblox lua
bool = true
--can set it to true or false
bool = false
print(bool)--prints false since bool == false
--can also use in an if statment
if bool == false then
 --some code
end

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