how would I make a script check a boolean value to be true or false before continuing on with the script. Like a waitforchild but for values?
There are 2 options
local boolValue = script.Parent.BoolValue boolValue.Changed:Connect(function(property) if property == "Value" then if boolValue.Value == true then print("true") else print("false") end end end)
This will run whenever a property changes on the BoolValue (any property) and you would have to check if the property changing is the correct one and the one you want.
local boolValue = script.Parent.BoolValue boolValue:GetPropertyChangedSignal("Value"):Connect(function() if boolValue.Value == true then print("true") else print("false") end end)
This has already specified which property we are waiting on to change, in this case, we are waiting for the Value property to change.
Hope this helped! Feel free to select this as an answer if this helped you!