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)
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)
You're not supposed to put the Value there.
Doorr.Changed:connect(function()
print("changed")
end)
Hope this helps!
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.
2 comments
just detect if its false or not
Doorr.Changed:connect. I think you dont need to type "Value" in there