For some reason, my sword animation that I made only works on me. When I ask a friend to test it on their character, it doesn't function and in the output it says cannot load animation.
I used a local script for the animation and I put an animation item in the local script. The local script is:
local CanAttack = true
script.Parent.Activated:connect(function()
local attack = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack)
if CanAttack == true then
attack:Play()
CanAttack = false
wait(3)
attack:Stop()
CanAttack = true
script.Parent.CanDamage.Value = true
end
end)
(There is also a boolvalue in the sword tool set to true)
So could someone give me a solution, that would be much appreciated.

4 comments
Is Your Game Fe?
Yes
Did you have your friend test it by giving the tool to them as a model? If you did, then it won't work. Animations can only be used by its publisher.
It wasn't a model as the sword parts weren't grouped together. All the parts were in a tool item in replicated storage. To use the sword, you have to buy it from a shop and it appears in the users inventory and does damage, but the animation unfortunately doesn't work