You’re saying your issue
‘Local Script’ meaning it’ll only appear for the client, inside of the tool I suggest creating a remote event and a serverscript all under the tool, place this code within the serverscript.
script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr)
local Track = plr.Character:WaitForChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(SlapAnimation)
Track:Play()
end)
Make sure to fire the remote event through the local script.
Local Script means it’ll only replicate it through the client, regardless if it’s animations / anything of that aspect.
Serverscripts will replicate it to every player inside the game.
My animation didn’t played, also there is no error
Tool.Activated:Connect(function()
if Equipped then
if not Tool.Enabled or not Equipped or CanSlap then
return
end
coroutine.wrap(function()
local Track = Character:WaitForChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(SlapAnimation)
Track.Priority = Enum.AnimationPriority.Action
Track.Looped = false
Track:Play()
end)()
Slapped = {}
Tool.Enabled = false
CanSlap = true
for Index, Player in ipairs(GloveZone:getPlayers()) do
SlapPlayer(Player)
end
wait(2)
CanSlap = false
Tool.Enabled = true
end
end)
That shouldn’t matter, regardless from my experience with working with tools that require an animation, I’d do it with a remote event on a server-script to prevent issues like these happening.
I suggest you use my method and create an instance for the animation.
I used @saouvs method and it worked! (but I didn’t use remote event, I played the animation directly from server instead)
Thanks for helping!!! also I found out that the animation I uploaded priority was set to Core, I reuploaded with priority set to Action
Hope this help other people that had this issue too