Why are my animations broken?

Hello there! I want to create a tool with working animations, however I have run into some issues.
On my screen, when I equip a tool, it works fine. However, when another person equips the tool, their animations appear buggy/glitchy on my side.

is a video of what it looks like. At the start I test my character’s animations and they work flawlessly, and when I test the animation on another account, from the perspective of my first account, they glitch quite a bit.

In my code, when the tool is equipped, I basically run this function with the names of two animations, that are played one after another, and then a third animation to act as an idle animation, that is looped and played after the second one.

function play2(anim, anim2, idleanim)
	if not active then return end

	local t1 = tracks[anim]
	local t2 = tracks[anim2]
	local t3 = tracks[idleanim]
	if not t1 or not t2 or not t3 then return end

	activeAnim = true

	t1:Play()
	t1.Stopped:Wait()
	if active then 
		t2:Play()
	else 
		return
	end
	t2.Stopped:Wait()
	if active then 
		t3:Play()
	else 
		return
	end
	current = idleanim
	activeAnim = false

end

There is noticeable glitching when I switch from one animation to the next. What can I do to fix this?

I looked on the Developer Hub and have not found a solution. I have tried to fix this issue with different ways and none of them have been successful so far.

Please help and thanks for your time! :heart:

Try setting the Animation priority to action or add wait(0.5) like that

Animation priority is set to action for all of the animations. I have the script wait until each animation is finished before beginning the next one.

Solution for those that have this problem.