Help With Animation Problem

Hello, I have a ledge climbing Animation where the player climbs a wall, I have it where once the animation is at the fully climbed at the wall I teleport the players avatar to the closest the animations position was, but it kind of works, the players gets teleported into the air then back to the right position, any help?

local TeleportTo = script.Parent.Parent.TeleportTo
local CanUse = true

script.Parent.Triggered:Connect(function(player, Prompt)
	if CanUse then	
	CanUse = false	
	player.Character.HumanoidRootPart.CFrame = script.Parent.Parent.CFrame
	local Humanoid = player.Character.Humanoid
	local Idle = script.Idle
	local IdleAnim = Humanoid:LoadAnimation(Idle)
	IdleAnim:Play()
	game:GetService("ReplicatedStorage").Climb:FireClient(player)
		IdleAnim:AdjustSpeed(0.6)
		wait(1)
		print("Slowed")
		IdleAnim:AdjustSpeed(0.3)
		wait(2.5)
		print("Speed Up")
		IdleAnim:AdjustSpeed(0.6)
		wait(0.2)
		print("Teleported")
		player.Character.HumanoidRootPart.CFrame = TeleportTo.CFrame
		IdleAnim:Stop()
		CanUse = true
	end
end)

It seems like the character is being teleported before the climb animation is stopped, which leads to the funky offset then “sliding” into the non-animated position. Maybe try stopping the animation then teleporting the character?