i'm not really a good scripter just a basic scripter and i wanted a player to change animation when it hits a certain walkspeed and everyone can see it, heres the script.
local Player = game.Players.LocalPlayer
local Character = workspace:WaitForChild(Player.Name)
local Humanoid = Character:WaitForChild('Humanoid')
local RunAnimation = Instance.new('Animation')
RunAnimation.AnimationId = 'rbxassetid://3518952951'
RAnimation = Humanoid:LoadAnimation(RunAnimation)
if Humanoid.Walkspeed == 25 then
RAnimation:Play()
elseif Humanoid.Walkspeed == 4 then
RunAnimation:Stop()
end
can someone help me please?
(it is a script not a localscript, the script is located in serverscriptservice)

3 comments
Are you sure the script is not inside a player? Does the script clone itself into players?
Title changed XD
For this script to work, the actual WalkSpeed has to change, not the player's velocity per say. The below scripts should work as expected, if the property itself changes. If you want to see how fast a player is currently moving, that's something else