How to make animation play and not stop when you walk?

So I have already created an animation and set the animation priority to the highest (Action). But when I walk around, the animation suddenly stops playing. How do I make it so it continues playing?

Manually set the Animation to looped from the animation editor. Or simply set AnimationTrack.Looped = true. See the Looped property.

I don’t want the animation to be looped. It should only play once, this is not a dance anim.
Plus I don’t think the problem comes from the loop itself because the animation should be around 5 or more seconds. But the first second it plays and I started walking, the walking animation overrides it.

Could you provide a gif/video outlining the issue and also paste your code here to better understand the problem.

Sure:

local animator = workspace[v.Name]:FindFirstChild("Humanoid"):FindFirstChild("Animator")
					local animationTrack = animator:LoadAnimation(script.Animation)
animationTrack:Play()