I want to use this custom running animation, but I’m not sure how to go about making it play while the player is moving. How would I detect if the player is walking?
2 Likes
you can constantly check if the humanoid’s walkspeed is greater than 0
What’s the read version of walkspeed that I could check?
Humanoid.WalkSpeed
ex:
local hum=game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
hum.WalkSpeed
make sure this is a localscript
Check the speed of the humanoid if the player is idle or not
Humanoid.Running:Connect(function(speed)
if speed > 0 then
return
else
Animation:Stop()
end
end)
Copy the Animate script ar runtime and change the Run anim ID.