(bump) Hi everyone! First of all, thanks for taking your time to read this question. I'm making a script that triggers when the value from a boolvalue changed. This is my script:
print('starting') script.Parent.Changed:connect(function() print('changed') script.Parent.Parent.Parent.Littletrigger.Value = true wait(0.1) script.Parent.Parent.Parent.Littletrigger.Value = false end)
I do always see "starting" in the output but when i change the value, i never see "changed" in the output. Also, i'm not getting any errors.... The localscript is in the boolvalue itself. Why a local script? This is my explorer:
StarterGui ScreenGui AvailableRooms BoolValue LocalScript
Thanks in advance for your help!, Jonas
I'd suggest using the new method of instances, Instance:GetPropertyChangedSignal(string Property)
This can be used to use a Changed event just for one property, and it's guaranteed to work 100% of the time.
script.Parent:GetPropertyChangedSignal("Value"):Connect(function() --code here end)
Hope this helps, if you have any questions, feel free to comment.