Hello,
I wanted to know how to stop a playing idle animation for a tool.
The animation loads and works perfectly fine but after unequipping the tool it is still active so the character is doing the animation without the specific tool.
local Tool = script.Parent
local Player = game.Players.LocalPlayer
local Char = game.Workspace:WaitForChild(Player.Name)
local Humanoid = Char:WaitForChild("Humanoid")
Tool.Equipped:Connect(function()
Humanoid:LoadAnimation(script.LongIdle):Play()
end)
Tool.Unequipped:Connect(function()
Humanoid:LoadAnimation(script.LongIdle):Stop()
end)
local Tool = script.Parent
local Player = game.Players.LocalPlayer
local Char = game.Workspace:WaitForChild(Player.Name)
local Humanoid = Char:WaitForChild("Humanoid")
local Idle = Humanoid:LoadAnimation(script:WaitForChild("LongIdle", 100))
Tool.Equipped:Connect(function()
Idle:Play()
end)
Tool.Unequipped:Connect(function()
Idle:Stop()
end)