Animation not playing properly first time

I’m creating a dead by daylight style game and I created an animation for the in-game pallets.

The first time the animation plays in a server it finishes not looking right.
(I should also note that I have a markerEvent thingy to make it stay positioned as it is)

kinda hard to explain so heres a video

what I think is happening is the animation isnt loaded properly so it kinda, well does that. Dont really know how to fix that tho

also for some context in the video the first pallet is off and doesnt stop correctly, the second pallet is how it should look.

wasn’t getting any feedback but I figured it out, for anybody wondering:

I put all the animations into a table

local animationsToPreload = {
	animationsManager.playerLeft,
	animationsManager.playerRight,
	animationsManager.palletKnock
}

I then created a little module thingy, which plays all animations

--Script
AnimationSetup.PreloadAnimations(animationsToPreload)

--Module
local AnimationSetup = {}

local TestFolder = game.Workspace:WaitForChild("TestFolder")


function AnimationSetup.PreloadAnimations(AnimationsToPreload)
	for i, animation in pairs(AnimationsToPreload) do
		local animTrack = TestFolder.AnimationController.Animator:LoadAnimation(animation)
		animTrack:Play()
	end
end


return AnimationSetup

the animations play from this folder in the workspace
1

I WOULD LIKE TO KNOW IF THERE IS A BETTER WAY TO DO THIS