So, i tried playing an animation when a tool is activated, but when the other player activates the tool, the animation appears to me as it is playing non-stop. Also, the other player is not able to see when i play the animation.
The following LocalScript is parented to the tool.
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
local anim = humanoid.Animator:LoadAnimation(script.Parent.PunchAn)
local cooldown = false
anim.Looped = false
-------------------------------------------------------------
script.Parent.Activated:Connect(function()
if cooldown == false then
anim:Play()
anim:AdjustSpeed(2.2)
cooldown = true
if cooldown == true then
wait(0.9)
cooldown = false
end
end
end)

2 comments
anim.Looped = false
Try replacing line 4 with "local anim = humanoid:LoadAnimation(script.Parent.PunchAn)"