Bool: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Mr Doom Bringer
No edit summary
>Mr Doom Bringer
No edit summary
(No difference)

Revision as of 00:58, 13 March 2010

Introduction

A Boolean, or Bool value is a very simple type of data. It can be either true or false. That's it. Either yes or no.

In Lua, everything that has a value is true, unless it is nil or false.


Booleans are really easy to use. Like so: Template:CodeExample MyBool = true

if MyBool then

--If "MyBool" is true, this code is run.

else

--If "MyBool" is false, this code is run.

end |}


Boolean
Property (Bool true/false)
Description True or False, the only two states available. Really simple.
Member of N/A


See Also

RBX.lua.BoolValue (Object)

Programming in Lua 2.2: Booleans

Lua Types Tutorial