Does anybody know how to make a tool with a custom idle and walking/running animation when equipped?
localScript inside tool:
local tool = script.Parent -- The tool position local player = game.Players.LocalPlayer local Equipped = false -- The Bool that will be used later local humanoid = player.Character:WaitForChild("Humanoid") or player.Character.Humanoid -- The Humanoid local Idle = script.Parent:FindFirstChild('Idle') or script.Parent.Idle-- Your Animation, be sure to put the ID local run = script.Parent:FindFirstChild("Run") local LoadAnim tool.Equipped:Connect(function() if not Equipped and Idle and LoadAnim == nil then Equipped = true LoadAnim = humanoid:LoadAnimation(Idle) LoadAnim:Play() end end) tool.Unequipped:Connect(function() if Equipped then Equipped = false LoadAnim:Stop() end end) humanoid.Running:Connect(function() if Equipped then isIdlePlaying = false local Animation = humanoid:LoadAnimation(Run) end end)