Stand up animation bugging

I was experimenting with a standing-up animation, to replace the default teleport out of the seat.

There is a seat part with an “Up position”, which is basically a part where the player should stand when it gets up.
Video of what happens:

Script:

script.Parent.Attachment.Sit.Triggered:Connect(function(plr) -- ProximityPropmt
	local char = plr.Character;
	script.Parent:Sit(char.Humanoid);
	char.Humanoid.JumpHeight = 0;
	
	game.ReplicatedStorage.LocalEvents.SeatJumpBind:FireClient(plr); --just fires the "JumpOutOfSeat" when the spacebar is pressed
	
	local con;
	con = game.ReplicatedStorage.ServerEvents.JumpOutOfSeat.OnServerEvent:Connect(function(player)
		local char = player.Character;
		local standAnim = char.Humanoid:LoadAnimation(player.Backpack.Anim.StandUp1);
		standAnim:Play();
		standAnim.Stopped:Wait();
		script.Parent:FindFirstChild("SeatWeld"):Destroy();
		wait() -- wait for the weld to be destroyed, if this is not here, the whole thing bugs out
		char.Humanoid.Sit = false;
		char.HumanoidRootPart.CFrame = script.Parent.Up.CFrame;
		char.Humanoid.JumpHeight = 0;
		con:Disconnect();
	end)
end)

So I assume it does that weird teleporting cuz the animation is not fully over (the transition from the stand-up animation to the idle animation), and when it teleports the character teleports even further. Could be fixed by removing that transition, but I couldn’t find how to do that.

It’s also weird how the character gets launched into the air. The “up” part is 0.1 studs above the normal level of the HRP, so I have no idea why it does that.

Any help is appreciated

1 Like

Ok so, found a solution. Not the solution I expected, but it works.

Instead of animating the LowerTorso inside the actual animation to make it look like it stands up, I Tween the HRP to the Up part when it should stand up. I had to redo the animation a bit to make the start, duration, and end of the Tween simpler numbers (it started at 11/30=0.36666 before, made it 12/30=0.4), but it works.

But I still have no idea why it was launched into the air. Makes no sense

Anyways, it looks like this now