How to change Walk Animations on Humanoids Walkspeed

Im trying to Change the Animation of a Player after their humanoid speed changes, im making a Sonic Game currently, Cant seem to get the animations to the player neither change its animations when its humanoid walkspeed changes

Script:
game.Players.PlayerAdded:Connect(function(player)
local player = game.Players.LocalPlayer:GetCharacterFromPlayer()
local Humanoid = player:FindFirstChild(“Humanoid”)
local Animations = script.AnimationController:Clone()
local WalkAnimation = script.AnimationController.Walk:Clone()
local RunAnimation = script.AnimationController.Running:Clone()
local SprintAnimation = script.AnimationController.Sprinting:Clone()
if Humanoid then
Animations.Parent = Humanoid.Parent
print(“Animations Added”)
WalkAnimation.Parent = Animations
RunAnimation.Parent = Animations
SprintAnimation.Parent = Animations
else
print(“No Humanoid Detected”)
end
if Humanoid.Walkspeed == 20 then
WalkAnimation:Play()
SprintAnimation:Stop()
RunAnimation:Stop()
else
WalkAnimation:Stop()
end
if Humanoid.Walkspeed == 35 then
WalkAnimation:Stop()
SprintAnimation:Stop()
RunAnimation:Play()
end
if Humanoid.Walkspeed == 50 then
SprintAnimation:Play()
WalkAnimation:Stop()
RunAnimation:Stop()
end
end)

Scripts in Serverscript Service btw

Did you insert a way of increasing your walk speed to those specific values? You do realize that the humanoid walk speed will always be set to 16 if you don’t make a script that manually increases or decreases it, right?

Also please put your code in these symbols `

yea in another script i did, but it says it couldnt find the player as the error, but rn im just gonna play some roblox then work on this later

Can you send me the picture of the script in which you increase the speed, the problem is clearly in it.

Added Images in post. I cant figure out how to copy the animations to local player and get a local players humanoid still using a Script I could try Local but i wouldnt think it would work