I want to make it so that the default animation only plays when my tool is unequipped, here's my script:
local fists = script.Parent
local anim = game.ReplicatedStorage.animations:WaitForChild("fistsIdle")
local track
fists.Equipped:Connect(function()
local humanoid = fists.Parent:FindFirstChildOfClass("Humanoid")
if humanoid then
track = humanoid:LoadAnimation(anim)
track.Priority = Enum.AnimationPriority.Idle
track.Looped = true
track:Play()
end
end)
fists.Unequipped:Connect(function()
if track then
track:Stop()
end
end)