so me and my friend are working on a game, yet for some reason, when I playtest it, only the animation buttons that I made work for myself. it's even worse in public servers, It doesn't work at all! please help. P.S the scripts for me and my friends animation-buttons are the same -pwgth
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://7284962336"
local trackanimation = nil
local playability = true
function playAnimation (animationSource)
if playability == true then
local plr = game.Players.LocalPlayer
trackanimation = plr.Character.Humanoid:LoadAnimation (animation)
trackanimation.KeyframeReached:Connect(function()
print("10!")
end)
trackanimation:play()
end
end
script.Parent.MouseButton1Click:Connect(playAnimation)

2 comments
They are client sided, use a remote event, to achieve this.
please say it in the "answer the question" I cant accept your answer lol