Teleport on Death Problem

I’m making a game where people spawn in a lobby, enter a waiting room, and then get teleported to another game. I wanted to know how, when someone dies, they would be returned to the lobby. I have absolutely no clue on how to do this so please help. Also if this is in the wrong category, I’m a noob to the Devforum, so please excuse me.

Have a safe Thanksgiving (if you celebrate it),
ParkCityUSA

3 Likes
local lobbyId = 000000000 --Change to lobby's place id

game:GetService("Players").PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		character:WaitForChild("Humanoid").Died:Connect(function()
			game:GetService("TeleportService"):Teleport(lobbyId, player)
		end)
	end)
end)
6 Likes

Ok. I think I get it now. I’m not very good at scripting, but I can kinda understand it!

I’ll see if it works! Thank you!