Weird Animation Snapping

I’m wondering why the animation just snaps like this instead of smoothly transitioning into the original animation. Is it a scripting issue? Any help would be greatly appreciated. Here is my script.

	hitTrack:Play()
	hitTrack:GetMarkerReachedSignal("StartHitbox"):Connect(function()
		-- hitbox stuff
	end)

	hitTrack:GetMarkerReachedSignal("EndHitBox"):Connect(function()
		print('destroy hitbox here')
		hitboxactive = false
		hb:Destroy()
	end)
	hitTrack:GetMarkerReachedSignal("EndAnim"):Connect(function()
		hitTrack:Stop()
	end)

I’m guessing this is a looping animation and when you call the stop() function when you get to the EndAnim marker there is a delay causing the animation to go back to the first frame for a split second

this video might explain why your having this problem

but in short it takes some time for the stop() function to replicate to the client and it could cause the animation to not stop perfectly where you want it to stop

plus there is also fade time that will cause the stop() function to take some time to fade out

Ah its because it was looping, thank you so much for your help!