The animation on a NPC is not loading in

Hello developers,

I am currently trying to animate a NPC. I’ve made an animation and uploaded it from the account I uploaded the game from (so yeah, I own the animation).
But the problem is that the animation simply doesn’t play. The NPC just stands still and does nothing. I tried printing the lenght of the animation, it was “0.8”. It seems like the animation is working, but it just doesn’t visiualy play. Code attached below.
EDIT:
Problem solved. (Animations in roblox studio don’t replicate to client)

local animation = script:WaitForChild("Animation")
local humanoid = script.Parent.Humanoid
local animationTrack = humanoid:LoadAnimation(animation)
wait()
animationTrack:Play()
animationTrack.Looped = true
print(animationTrack.Length)