Answers for "exemple boolean and why it is used"

Lua
0

exemple boolean and why it is used

--example boolean
local thisboolean = true    --a boolean varible example

--code with event or something else

if thisboolean == true then --here we gonna do if the boolean is true then it does the code
	thisboolean = false
	--code of what you wanna do in here.
	print("ok we have done it now gonna set it again to true so we can do it again") --you can delete this part
	wait(1) --here we gonna wait. you can change it
	thisboolean = true --now its true. so you can do it agian again and again and not everytime like 100000 times in a sec
    
end

--booleans are used mostly to see if something is true or false with the if/then statement and then the code happens.
Posted by: Guest on February-04-2022

Browse Popular Code Answers by Language