How can I get it to work properly?
local plr = game.Players.LocalPlayer
local Cha = plr.Character or plr.CharacterAdded:Wait()
local Hum = Cha.Humanoid
local HumanoidRootPart = Hum.RootPart
HumanoidRootPart:GetPropertyChangedSignal('Position'):Connect(function()
print('Position')
end)
HumanoidRootPart:GetPropertyChangedSignal('Orientation'):Connect(function()
print('Orientation')
end)
HumanoidRootPart:GetPropertyChangedSignal('CFrame'):Connect(function()
print('CFrame')
end)
wait(5)
HumanoidRootPart.CFrame = CFrame.new(0,50,0)
It’s not printing anything at all when I move around.
It only fire’s when a script edits the HumanoidRootPart Position
# GetPropertyChangedSignal
2 Likes
colbert2677
(ThisMangaOnHiatus)
January 26, 2019, 8:34am
#2
I think something regarding the fact that these properties don’t fire the Changed signal was raised before. You’re already using the method correctly so your issue relies in the fact that these properties don’t fire the Changed method on update.
1 Like
Is there a good reason that they don’t fire?
Is this going to be reliable in the future?
(It’s ok if you don’t know)
1 Like
They don’t fire unless edited by a script because they would fire way too much iirc.
2 Likes
So I’m suppose to use a loop to check instead?
Alright.
I also found this a little bit too late
This new method returns a version of the Instance.Changed signal that is will be fired for just one property.
The idea behind this is that it’s sometimes needlessly expensive to listen to the Changed signal for all properties when you only care about a few properties or just one property. Using this API a filtered version of the signal can be used to listen to only those properties.
An example of this is the CurrentCamera.Changed listener in the PopperCamera script.
local function OnCameraCha…
3 Likes
kingdom5
(kingdom5)
January 26, 2019, 10:43am
#6
Properties that fire too often do not run the Changed event.
https://developer.roblox.com/api-reference/event/Instance/Changed
This event does not fire for physics-related changes, like when the CFrame
, Velocity
, RotVelocity
, Position
, Orientation
and CFrame
properties of a BasePart
change due to gravity.
8 Likes
WingItMan
(WingItMan)
January 26, 2019, 11:41am
#7
Could it be that your character isn’t Dyce losing yet?
Try
Cha = workspace:WaitForChild(plr.Name)
Consider using this on humanoid’s as well. Add prints along the way to see what is loaded.
Edit:
I guess PropertySignalChange only fires when a script changes the actual property of the object?
1 Like
Dysche
(Dysche)
January 26, 2019, 1:48pm
#8
Both .Changed
and :GetPropertyChangedSignal()
don’t fire when variables are updated by physics. This includes movement variables like CFrame, Position and Rotation in your case. Instead people use RunService.Stepped:Connect()
for this. (From what I’ve read and experienced myself)
9 Likes