How Can I Teleport In And Out Of Seats Effectively?

Basiclly in boxing in between rounds you sit in the corner get advice and get your cuts worked on etc. I’m trying to do that for my game but its been annoying, I just need to be able to teleport the player in and out of the seat

The issue is, When I have the player sit down in the seat I TP him to the seat, this dosent work that well but it works I guess, I’d like to change it but what definatley doesn’t work is the TPing out, I try destroying the seat before teleporting the player but It dosent seem to work, I am either doing something wrong or I need to find some sort of alternative

I checked on this fourm from posts from years ago and found no answers.

This Spawns The Seat

function Intermission(SelectedFigter1)
	
	--Seat
	local Corner1Seat = game.ReplicatedStorage.FightingObjectsHolder.Corner1
	local target = Corner1Seat:Clone()
	target.Parent = workspace.Seats
	
	--TPPoint
	local TargetPoint1 = target.Position
	
	--Events
	game.ReplicatedStorage.FightingEvents.InputOff:FireAllClients()
	game.ReplicatedStorage.GameEvents.LoadingScreen:FireAllClients()
	wait(0.5)
	Teleport(SelectedFighter1, TargetPoint1)
	wait(1.5)
	game.ReplicatedStorage.FightingEvents.CornerCutscene:FireAllClients()
	
	--RoundClockLoop
		repeat	
			IntermissionTime = IntermissionTime -1
			status.Value = "Time Left: "..IntermissionTime
			wait(1)
		until IntermissionTime == 0 or CanWin == false or #workspace:GetChildren() == 0
end

This Destroys It (Dosen’t work)

function Round(SelectedFighter1)
	
	--WeldBreaker
	workspace.Seats.Corner1:Destroy()

	--Events
	game.ReplicatedStorage.GameEvents.LoadingScreen:FireAllClients()
	game.ReplicatedStorage.FightingEvents.InputOn:FireAllClients()
	wait(0.5)
	game.ReplicatedStorage.FightingEvents.NormalCamera:FireAllClients()
	wait(0.5)
	
	--TP
	Teleport(SelectedFighter1, FightReady1.Position)
	
	--Clock Loop
		repeat	
			RoundTime = RoundTime -1
			status.Value = "Time Left: "..RoundTime
			wait(1)
	until RoundTime == 0 or CanWin == false or #workspace:GetChildren() == 0
	
	local Rounds = Rounds + 1
end

When I do the teleport in the round function the seat comes with the player to the spot.

1 Like

The seat is teleporting with the player because your seat is welded to the player. In order to prevent that from happening, you could just make their humanoid.Jump = true first or destroy the weld. Also, if you want to teleport them to the seat better, you can merely create the weld yourself and if I recall correctly it should position them properly.

2 Likes

When I try destroying the weld when I teleport the player the seat object moves to the desired TP spot instead of the player

Possibly need some small wait(). If that still doesn’t work, jumping will destroy the weld anyway, and you can teleport upon the weld being destroyed from that.

That wouldn’t happen if you use SetPrimaryPartCFrame.
Then they wouldn’t teleport at all while being in the seat.

I like the idea but the issue is that wouldn’t look to good

If you want them to sit in a specific seat, you can use Seat:Sit().

When you want them to exit the seat, you can do Humanoid.Seated = false.

2 Likes

To anyone that is coming across this post 3 years later

Humanoid.Seated

was changed to

Humanoid.Sit

12 Likes