GetPropertyChangedSignal not working

Hello, I need script when player moves then hose will move too but
GetPropertyChangedSignal is not working
Script

local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local RegistredHydrants = game.ReplicatedStorage.RegistredHydrants
local CheckIfRope = game.ReplicatedStorage.HydrantRemotes.CheckIfRope
local GetPlayerRope = game.ReplicatedStorage.HydrantRemotes.GetPlayerRope
local CreateRope = game.ReplicatedStorage.HydrantRemotes.CreateRope
local DeleteRope = game.ReplicatedStorage.HydrantRemotes.DeleteRope
local ActualTool 
wait(2)
local Player = game.Players.LocalPlayer
local ActualHyd
local Character = Player.Character
if Player.Backpack:FindFirstChild("Fire Hose") then
	ActualTool = Player.Backpack:FindFirstChild("Fire Hose")
	elseif Character:FindFirstChild("Fire Hose") then
	ActualTool = Character:FindFirstChild("Fire Hose")
end
-- THIS PART
Character.HumanoidRootPart:GetPropertyChangedSignal("Position"):Connect(function()
			local Bool = CheckIfRope:InvokeServer()
			if Bool == true and ActualTool.Parent == Character then
				DeleteRope:FireServer()
				CreateRope:FireServer(ActualHyd.Value.Join,ActualTool.Handle.Join)
			end
end)
-- END OF PART
UserInputService.InputBegan:Connect(function(key) --Create new rope
		for _,hyd in pairs(RegistredHydrants:GetChildren()) do
		if (hyd.Value.Position - Character.HumanoidRootPart.Position).Magnitude <= 3 and key.KeyCode == Enum.KeyCode.E and ActualTool.Parent == Character then
			local Bool = CheckIfRope:InvokeServer()
			if Bool == false then
				CreateRope:FireServer(hyd.Value.Join,ActualTool.Handle.Join)
				ActualHyd = hyd
			end
		end
	end
end)

Thank for any tips.

You can maybe getpropertychangedsignal on the Humanoid’s MoveDirection , it changes every time the player moves. This is how I usually do it.

Note; I haven’t read the whole script, I have no idea if it’s suitable to your needs.

Can you send me script how you do it ?

Replace

with

Just to note; This isn’t a place where people write scripts for you. I also think you didn’t wait for the humanoidrootpart to be loaded in, but, that’s just a hunch, since you haven’t provided any errors.

The reason why :GetPropertyChangedSignal() doesn’t fire with Position (and many other property such as CFrame) because it’s supposed to change at a very fast rate, which might cause problems. @fredrick254 suggested .MoveDirection which might work, but I’m also gonna take a wild guess that that won’t work either.

If it won’t, you might be able to use the .Running event.

Just tested. It works.

Properly implemented, it works like a bool switch, like Running = true/false, since movedirection doesn’t update at very fast rates. After all, it’s just direction, which doesn’t change all the time.

1 Like