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

how do I check if a boolean value has been changed?

is there any other way to check if a boolean value has been changed?

i am getting the error PlayerGui.PlayerScripts.beam:51: attempt to index boolean with'Changed'

Doorr.Value.Changed:connect(function()
	print("changed")
end)

2 comments

0

just detect if its false or not

0

Doorr.Changed:connect. I think you dont need to type "Value" in there

2 answers

✓ Accepted answer

You're not supposed to put the Value there.

Doorr.Changed:connect(function()
    print("changed")
end)

Hope this helps!

1 comment

0

That is correct, however, is will fire whenever anything about the Instance changes (such as the name, or any other property).

Hey, though the answer above is correct, I strongly emphasize on using ':GetPropertyChangedSignal()'

I'll demonstrate how to use that event.

Doorr:GetPropertyChangedSignal("Value"):Connect(function()
	print("changed")
end)

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