When equipped tool, walking animation will change

I’ve figured it out. For those who have the same problem as me, here’s the script.

local Player = game.Players.LocalPlayer

repeat wait() until Player.Character

local Character = Player.Character

local Humanoid = Character:FindFirstChild("Humanoid")

local Animation = Humanoid:LoadAnimation(script.Animation)

tool = script.Parent

tool.Equipped:Connect(function()

game.Players.LocalPlayer.Character.Animate.walk.WalkAnim.AnimationId = "rbxassetid:// your running id"

Humanoid:ChangeState(Enum.HumanoidStateType.Landed)

end)

tool.Unequipped:Connect(function()

game.Players.LocalPlayer.Character.Animate.walk.WalkAnim.AnimationId = "rbxassetid:// put your normal walking id" --default id

Humanoid:ChangeState(Enum.HumanoidStateType.Landed)

end)

Insert a Animation into the local script and put this into the tool.

8 Likes

literally the one and only true solution on whole google

Here is THE solution after hours of searching how to solve this with a sprint system w/ animations