How can I check if a Player has moved? Movedirection doesn’t work for me as I constantly have to check if player has moved. Is there a more simple function like Humanoid.Moved?
I have also tried :GetAttributeChangedSignal(), and it did not work.
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(function()
if humanoid.MoveDirection.Magnitude > 0 then
--// Your code here
end
end)