Help with local player animation

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    for the other players to see the animation, when in use, and for the animation to stop playing when its unequipped
  2. What is the issue? Include screenshots / videos if possible!
    well currently, it will continue to play the loop of the player doing the animation, but when it unequips it still shows the animation playing for other players
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I’ve been looking for a while to see if their is any reason or solution to why its doing it, I’ve looked on google and here

local tool = script.Parent
local IdleAnim = Instance.new("Animation")
IdleAnim.AnimationId = "rbxassetid://8701900022"

local firstTrack 
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://8701693781"

local track
local plr = game.Players.LocalPlayer
local player = tool.Parent:IsA("Model") and game.Players:GetPlayerFromCharacter(tool.Parent) or tool.Parent.Parent
local char = player.Character or player.CharacterAdded:Wait()
local humR = char:WaitForChild("HumanoidRootPart")
local Debounce = false


tool.Equipped:Connect(function()
	firstTrack = script.Parent.Parent.Humanoid:LoadAnimation(IdleAnim)
	firstTrack.Priority = Enum.AnimationPriority.Action
	firstTrack:Play()
	humR.Anchored = true
	wait(1)
end)
tool.Activated:Connect(function()
	track = script.Parent.Parent.Humanoid:LoadAnimation(anim)
	track.Priority = Enum.AnimationPriority.Action
	if Debounce == false then
		Debounce = true
		track:Play()
		wait(1.2)
		track:Stop()
		wait(0.1)
		Debounce = false
	end	
end)


tool.Unequipped:Connect(function()
	if firstTrack then
		firstTrack:Stop()
		humR.Anchored = false
	end
end)

tool.Unequipped:Connect(function()
	if track then
		track:Stop()
		track:Destroy()
	end
end)

it still shows for other players, but does it still show for you too?

Yeah for me on screen it shows the animation working, and if i unequipped it, then its unequip

But if I test it with another player, when I equip it, then use it, and unequipped, it then still continues to play it

Wait does that mean when you unequipped it, it still plays for you too?

Well before for me it would stop, but for the other player would show me running around doing it, but on my screen I aren’t

Its like the idle one dosent stop for them but does for me