Reproduction Steps
Currently, as of 11/13/21, Instance:GetPropertyChangedSignal() does not fire under certain conditions. If you are listening for the CanCollide property to be changed on a BasePart that is owned by a player’s Humanoid, the signal will never be fired.
Reproduction steps:
Open the attached repro file
Run a local test server with 2 clients
In client #1’s studio instance, open client #2’s avatar in the explorer widget. Select the “Upper Torso” part.
In the properties widget, set CanCollide to false. Observe in the output that the “CHANGED” message is only logged once, even though the property was changed twice - once by the humanoid, once by you.
If CanCollide is set from code, the same issue occurs.
Expected Behavior
It is expected that GetPropertyChangedSignal's signal will always fire, regardless of if a Humanoid has changed the property or a developer’s code has changed the property.
Actual Behavior
The signal returned from GetPropertyChangedSignal never fires if the property was changed by a player owned Humanoid.
Workaround
None
Issue Area: Engine Issue Type: Other Impact: High Frequency: Constantly
I know Humanoids force on CanCollide for certain limbs, so my thinking is that even when you attempt to change it, since it’s forced on it won’t register that as a change, as it’s being overriden essentially.
That’d make sense if the opposite was happening, but here the GetPropertyChangedSignal fires after you change the property (either manually or from code), not when humanoid does. Also, I believe Humanoids don’t necessarily force the CanCollide, they just override it each frame (which by the way won’t be the default behavior for much longer due to this change).
as for the workaround, would this not function the way you'd like?
local lastBool = false
local torso = workspace.Dummy.UpperTorso
game:GetService("RunService").RenderStepped:Connect(function()
if torso.CanCollide ~= lastBool then
lastBool = torso.CanCollide
print('Changed:', lastBool)
end
end)
obviously much less efficient but still something nonetheless.
Actually this is because not all property changes from C are signalled back to Lua’s change signal thingimjaib. The same thing happens with Sound.PlaybackTime and Part.Position