if not game.Players.LocalPlayer.Character then
wait()
end
local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local chr = plr.Character
while true do
walkAnim = chr.Animate.walk.WalkAnim
runAnim = chr.Animate.run.RunAnim
UIS.InputBegan:connect(function(key)
if key.KeyCode == Enum.KeyCode.LeftShift then
chr.Humanoid.WalkSpeed = 24
chr.Humanoid:LoadAnimation(runAnim)
end
end)
UIS.InputEnded:connect(function(key)
if key.KeyCode == Enum.KeyCode.LeftShift then
chr.Humanoid.WalkSpeed = 12
chr.Humanoid:LoadAnimation(walkAnim)
end
end)
wait()
end
I feel like this script should work, I have the animation Ids right, so I do not know what the problem is. It is just running the Walk animation. It still changes WalkSpeed though. I set the Run animation to an id, instead of it being run.xml or whatever it usually is. Maybe the problem is in the animation script and not this, I dunno...

2 comments
Hmm, still not running the right animation...
All fixed, chr.Humanoid:LoadAnimation(runAnim) should of been a local variable, then I just ran the animation!