Can't detect when part is moving

So I am trying to make a “valve like” physics. I want detect that the part is moving but it seems it doesn’t work.
The code:

prop:GetPropertyChangedSignal("Position"):Connect(function()
		print("Part position has changed")
end)

I tried using .Changed aswell and changing from Position to AssemblyLinearVelocity

It doesn’t prints anything on server and client. Does it have any fix or is there any other way to detect if part is moving?

https://devforum.roblox.com/t/getpropertychangedsignal-position-not-working/1445894
This should help you

1 Like
local Game = game
local RunService = Game:GetService("RunService")
local Workspace = workspace
local Part = Workspace.Part

local Position = Part.Position

local function OnHeartbeat()
	local _Position = Part.Position
	if _Position == Position then return end
	Position = _Position
	print("The part's position has changed!")
end

RunService.Heartbeat:Connect(OnHeartbeat)