Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

ive seen people open a gui using bool variable like

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

but then ive seen

if Noob = false then
1
Probably to have that value accessible to other scripts that might need it. User#19524 175 — 5y
0
^ AswormeDorijan111 531 — 5y
0
The second code will fail... but its probally what incapaz said Leamir 3138 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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.

Ad

Answer this question