Looped Animation keeps stopping

Hi there, I have a idle gun animation that is meant to work like below:


However this happens:

I’ve tried setting the priority to action so that it overrides the current roblox idle animation and setting looped to true, but it still doesn’t seem to work for some reason. I don’t know what else to attempt as any other person with the confusion like me would have already tried like said before.

Script below:
local stanceanim = Instance.new(‘Animation’)
stanceanim.AnimationId = “rbxassetid://9980066798”

	local stanceanim = animator:LoadAnimation(stanceanim)
	stanceanim.Looped = true
	stanceanim.Priority = Enum.AnimationPriority.Action
	stanceanim:Play()

in the Animation editor, open up your animation and set Looped to true and at the same time set its priority to action

< toggle loop

don’t set their properties in the script, it may not work
images from developer hub

ok so from what I notices here you are calling the animationtrack the same as the animation instance, maybe change the name of the animationtrack to stanceanimtrack

I tried that, still doesn’t work.

Alright will try.

That works thanks!

1 Like