You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Had a weird race execution of the observer. If the property is ready the Changed Event is called first before the initial deferred callback.
When the server called Set() on the property, Client receives the changed event but then since calling the ClientRemoteProperty:Observe() defers the current value. It overrides the change resulting to going back to the old value.
functionClientRemoteProperty:Observe(observer: (any) -> ())
ifself._readythen--task.defer(observer, self._value)task.spawn(observer, self._value)
endreturnself.Changed:Connect(observer)
end
Note
I am not sure changing this to spawn to call it immediately fixes the whole thing. But doing this on my project fixes my issue.
Had a weird race execution of the observer. If the property is ready the Changed Event is called first before the initial deferred callback.
When the server called
Set()on the property, Client receives the changed event but then since calling theClientRemoteProperty:Observe()defers the current value. It overrides the change resulting to going back to the old value.Note
I am not sure changing this to spawn to call it immediately fixes the whole thing. But doing this on my project fixes my issue.