Teleporting out of a seat issue

Greetings! I have been trying to learn scripting recently but I can’t figure this thing out.

This is what I’ve scripted to make the player press E with the proximityprompt and then get teleported out of the seat. The player gets teleported out, his custom seating animation stops playing and he stops seating.

The issue is that, when I press E to sit again It will make me sit where the player got teleported. Which means that when the player teleported, it teleported the Seat aswell. How can I solve this? Thank you.


script.Parent.Triggered:Connect(function(plr)
	plr.Character.Humanoid.Sit = false
	plr.Character.HumanoidRootPart.CFrame = CFrame.new(workspace.Bench.PromptExitPart1.Position)


	workspace.Bench.PromptExit.ProximityPrompt.Enabled = false
	local AnimationTracks = plr.Character.Humanoid:GetPlayingAnimationTracks()
	for i, v in pairs(AnimationTracks) do
		v:Stop()
	end


end)
1 Like

There might be a weld with the seat and the player? And if so, you should delete that weld.

You can make the player stand up before teleporting, or manually delete the ‘SeatWeld’ under the seat.

This weld is likely what’s causing issues.

Pretty sure you also need a small wait before teleporting to be sure the player is unseated.

1 Like

Yes, thank you.

What I did was add a 0.5 wait and after that make the seat teleport to its previous location.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.