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

Why do people use boolvalues to open guis instead of boolean variables?

ive seen people open a gui using bool variable like

if script.Parent.Handler.BoolValue.Value == 

but then ive seen

if Noob = false then

3 comments

1

Probably to have that value accessible to other scripts that might need it.

0

^

0

The second code will fail... but its probally what incapaz said

1 answer

For me personally, I would use the variable boolean and not an instance boolean because normally when I am working with Instance booleans, my code can be extremely glitchy, I don't know if this is a roblox error or something with my code I am doing wrong, that is why I most of the time stick to the boolean variable. In some cases though when I need to access the same boolean from another script, I need to create a boolean Instance to access it and check if it is true.

So I recommend using boolean variables rather than bool Instances.

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