How to detect player movement

Hello Developers,

I am wondering how I would detect when a player is moving without using Humanoid.Running, as that only fires when the humanoid starts and stops moving. I’ve tried using :GetPropertyChangedSignal() on the HumanoidRootPart’s position, but that doesn’t work.

Any help is appreciated!

Thanks,
Lucid

You can get all player humanoids via a for loop in the player service.

for i,player in pairs(game:GetService("Players"):GetPlayers()) do

player.Character:WaitForChild("Humanoid").MoveDirection:GetPropertyChangedSignal("Magnitude"):Connect(function()
print("movement detected!")
end)

end

You can check Humanoid.MoveDirection.

if Humanoid.MoveDirection.Magnitude > 0 then
    -- do something
end

You could do

Local character = game.Players.LocalPlayer.Caracter
Local Humanoid = character:WaitForChild(“Humanoid”)
if Humanoid.MoveDirection.Magnitude > 0 then
— do something
end

Oh someone already said this lol