Recently I noticed that some of my scripts which utilize Instance.Changed have either stopped working properly or completely broke.
After doing some research it turns out that the reason behind this case is one of the most recent releases:
Even though as of now it is still marked as “Pending”, the above change has already came to effect.
Upon noticing this “improvement”, I immediately voiced my objection and explained in detail why it should not be rolled out here: Release Notes for 653 - #7 by vfx_1
At that time the change was not in effect yet.
Most of my scripts responsible of handling physically controlled objects relied on the following trick:
local unanchoredPart = script.Parent
unanchoredPart.Changed:Connect(function(value)
if value == 'NetworkIsSleeping' then
-- Handle the rest
end
end)
This used to be the most efficient way to take an action whether an object has fallen asleep or woke up.
As “NetworkIsSleeping” is a non-scriptable property, after the update it is no longer possible and there are no other alternatives available.
I had a few uses for it such as forcefully waking up the object with
unanchoredPart:ApplyImpulse(Vector3.one)
once NetworkIsSleeping was signaled and for example the object has not reached the target angle yet or ended up in an unwanted position. If the target angle/position has been reached, I’d anchor the object and do whatever else I needed.
I know there are other people who used this or similar tricks with the .Changed signal, therefore I am afraid that this update could cause even more issues.
System Information
Windows 11 Pro 21H2
Intel(R) Core™ i7-4800MQ CPU @ 2.70GHz
I am fully aware that non-scriptable properties are called “non-scriptable” for a reason and were not meant to be relied upon, however often using them is literally the most efficient and reliable way possible. Many scripts like mine intentionally expected non-scriptable properties to be called with Instance.Changed, while I understand that some people never expected it to happen.
This behavior always seemed to be intentional and existed for too long just to be just removed without any good alternative provided to the developers.
Expected behavior
Instance…Changed and DataModel.ItemChanged signals should still be called when non-scriptable or inaccessible properties change.
As of now, the best options to address this issue are:
- Reverting the update,
- Allowing the use of non-scriptable properties with :GetPropertyChangedSignal(‘’),
- For my specific case making BasePart.NetworkIsSleeping read-only rather than non-scriptable as well as all other useful properties