So me and a friend are working on a game and he made a sprinting animation and we cant get it to work and dont know why, so when you press shift we want it to play the animation but it dont please help!
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Human = Character:WaitForChild("Humanoid")
local Mouse = Player:GetMouse()
local Sprinting = false
local SprintingANIM = script.Sprinting
local SprintingANIM_Play = Human:LoadAnimation(SprintingANIM)
Mouse.KeyDown:connect(function(key)
if key:byte() == 48 then
print'Shift down'
SprintingANIM_Play:Play()
--game.Players.LocalPlayer.Character.NewAnimate.run.RunAnim.AnimationId = 750586462
--game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 23
end
end)
Mouse.KeyUp:connect(function(key)
if key:byte() == 48 then
print'Shift up'
SprintingANIM_Play:Stop()
--game.Players.LocalPlayer.Character.NewAnimate.run.RunAnim.AnimationId = 896397665
--game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
end
end)

3 comments
Its fine, i have someone making a script but il go ahead and accept your answer :)
I recommend that you learn how to script.
I recommend that you learn how to script.