AnimationTrack Automatically stopping

I’ve put this here because I didn’t know where else
I’ve never had this problem before but my animation track automatically stops
This is a clip of what happens
The animation in question is the guy putting his hands behind his back (player 1)
I’ve tried changing animaiton priority in the animation editor but no change.
Any help?
https://gyazo.com/f7f897d7438f6b2d00f8e441e1d11718

Code please?

It seems like the animation breaks when he moves his arms. Are you sure you changed the animation priority to action, and then re-exported it?

Yep, I’ve changed every single one of the priorities to make sure I wasn’t messing anything up.

local detainani = arresttools.Animations:FindFirstChild("Arrest2")

event.OnServerEvent:Connect(function(player, victim)
	victim.Character.Humanoid.WalkSpeed = 0
	victim.Character.Humanoid.JumpPower = 0
	local detainanimation = victim.Character.Humanoid:LoadAnimation(detainani)
    detainanimation:Play()
	victim.Character.Humanoid:UnequipTools()
end)

The issue might be that the script is running multiple times. Maybe use a debounce or a variable.

It’s not running multiple times. It runs once when the event is fired. I wouldn’t need a debounce at all.

The only thing I can reccomend then is using the print command to see what happens with the script. This can tell you if something stops, activates twice, etc. Other than that I can’t really help as I’m not that great with animation management.