I have this inside a serverscript, animating an NPC
humanoid = script.Parent.Humanoid
root = script.Parent.HumanoidRootPart
anim = script.Parent.HumanoidRootPart.Animation
aCon = script.Parent.HumanoidRootPart.AnimationController
animTrack = aCon:LoadAnimation(anim)
animTrack:Play(0.1,1,.5)
It does work in offline mode but it doesnt work online, the only "error" I get is "Content failed because HTTP 404 content not found" with the Id of the place, so I think its not an error related to the animation but the place itself?

5 comments
Is this a looped animation?
Yes it is
I had this same problem and found that with looped animations its state does not seem to replicate to new player. Add a wait(5) to test that this is the problem, you should test this in server mode in studio.
I have not found a solution to this problem but you could eather do the animation on a local script or not use a looped animation.
You are right, adding a wait(10) before playing the animation seemed to solve the problem somehow