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

Anyone know why scripts don't detect changed values?

Asked by 4 years ago

Surely this should work, but it doesn't seem to fire the function when the value is changed by another script?

function NewValue() while true do wait(.5) plantName = NewValue print("Changed") -- more irrelevant code here end end

script.Parent.Parent.Value.Changed:connect(NewValue)

0
[https://developer.roblox.com/api-reference/function/Instance/GetPropertyChangedSignal](https://developer.roblox.com/api-reference/function/Instance/GetPropertyChangedSignal) sheepposu 561 — 4y
0
Just a suggestion. We used to have to use values for "inter-script" communication. However, with the introduction of bindable events (https://developer.roblox.com/api-reference/class/BindableEvent) this is no longer necessary. I highly suggest that if you are waiting for another script to do something (doing something to the plant name?) then it might be better to have that script use a bind.event User#18718 0 — 4y

Answer this question