I am making a custom tool holding animation system and the custom animation will be stopped when the tool is unequipped
I do not know how to though stop a specific animation when the tool is unequipped
I did tried the following code but the issue is that all animation playing will be stopped when the code runs (including walking/idle animations)
script.Parent.Unequipped:Connect(function()
local Player = game.Players.LocalPlayer
local AnimationTracks = Player.Character.Humanoid:GetPlayingAnimationTracks()
for i, v in pairs(AnimationTracks) do
v:Stop()
end
end)