How could i make animations pause before they end accurately, and reliably?

Hello DevForum!
I’ve been coding Restraints on roller coasters for a group for almost a year now, but a common issue i face is when the animation ends, sometimes my code just does not work and the Restraints just slam shut.

I usually add 100 ms of extra keyframes so it does not shut and for the most part it works, but they occasionally slam shut more then i would like it to.

Here is some code of the method ive used to Close the restraints.



Any ideas of fixes would be greatly appreciated :>
function UnlockRows () 
   --print("unlocking")
   if CanUnlock == true then


   	R1Debounce = false
   	R2Debounce = false
   	R3Debounce = false --- IGNORE THIS PLEASSEEEE
   	R4Debounce = false
   	R5Debounce = false
   	R6Debounce = false


   	--- Unlocks all the rows
   	for i, v in pairs(RideOpTable) do
   		v:Play()

   		v.KeyframeReached:Connect(function(RestraintUp)
   			v.TimePosition = 1.5
   			v:AdjustSpeed(0)
   		end)
   	end
   	for i,v in pairs(SeatsTable) do
   		if v.Occupant then

   			-- Code that aint for u guys lol
   			
   			

   			--print("Awarding Badge")


   		elseif not v.Occupant then
   			v.Disabled = false
   		end
   	end
   end

end