I am trying to make a walking animation when you walk but when you press CTRL the animation turns into a sprint. I attempted to change the animation ID to a sprinting animation but it isn’t working. Any suggestions or feedback?
Code:
local UIS = game:GetService(“UserInputService”)
local player = game.Players.LocalPlayer
local Character = player.Character
local humanoid = Character.Humanoid
UIS.InputBegan:Connect(function(input,isTyping)
if isTyping then
return
elseif input.KeyCode == Enum.KeyCode.LeftControl and humanoid.WalkSpeed == 16 then
humanoid.WalkSpeed = 25
game.StarterPlayer.StarterCharacterScripts.Animate.walk.WalkAnim.AnimationId = “http://www.roblox.com/asset/?id=6950127912”
elseif input.KeyCode == Enum.KeyCode.LeftControl and humanoid.WalkSpeed == 25 then
humanoid.WalkSpeed = 16
game.StarterPlayer.StarterCharacterScripts.Animate.walk.WalkAnim.AnimationId = “http://www.roblox.com/asset/?id=6949895562”
end
end)