sorry if this is a bad topic, i suck at creating topics.
-
I need to create a movement/idle animation changer for my sprint script
-
My movement/idle animation changer isn’t working
this is what i have in a local scipt at starterpack
char.Animate.walk.WalkAnim.AnimationId = "rbxassetid://7006481757" char.Animate.run.RunAnim.AnimationId = "rbxassetid://7006481757" char.Animate.idle.IdleAnim.AnimationId = "rbxassetid://7006517400"
full script:
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local localPlayer = Players.LocalPlayer
local char = localPlayer.Character
UserInputService.InputBegan:Connect(function(input, gameProccesed)
if gameProccesed then
return
else
if input.KeyCode == Enum.KeyCode.LeftShift then
humanoid = localPlayer.Character:WaitForChild("Humanoid")
humanoid.WalkSpeed = 20
char.Animate.walk.WalkAnim.AnimationId = "rbxassetid://7006481757"
char.Animate.run.RunAnim.AnimationId = "rbxassetid://7006481757"
char.Animate.idle.IdleAnim.AnimationId = "rbxassetid://7006517400"
end
end
end)
UserInputService.InputEnded:Connect(function(input, gameProccesed)
if gameProccesed then
return
else
if input.KeyCode == Enum.KeyCode.LeftShift then
humanoid.WalkSpeed = 16
end
end
end)