Animation Stops in the last frame for a while

hello! i was programming a window jump system, but when the animation ends, it has a transition to Idle Animation and I know how to take it off

I tried using The Play(0, 10), but just don’t work well

here is a part of Script(Case Be required):

local function isInFront()

local lookVector = parkourPart.CFrame.LookVector
local toPlayer = (rootPart.Position - parkourPart.Position).Unit
local dot = lookVector:Dot(toPlayer)
return dot > 0.1

end

local function tryParkour()

local PlrTeleport = model.PlrTeleport
local PlrTeleport2 = model.PlrTeleport2	
local dist = (rootPart.Position - parkourPart.Position).Magnitude

if dist <= maxDistance and isInFront() then
	
	for _, anim in pairs(animations) do anim:Stop() end
	
	
	rootPart.CFrame = PlrTeleport.CFrame
	OnParkour = true
	
	animations.Parkour:Play(0, 10)
	animations.Parkour.Stopped:Wait(0)
	animations.Idle:Play(0, 10)
	rootPart.CFrame = PlrTeleport2.CFrame
	
else
	
	warn("Fora de alcance ou não está na frente da madeira.")
end

OnParkour = false

end

1 Like

i don’t see the issue?
what is going on

when the Player got teleported, he has an transition para o Idle, between 2-6 seconds of the video

Does just Play:(0) work?