Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I use TeleportService to teleport somebody to a separate game when they die?

So I want to make a teleporter that teleports the player when they die. I should be able to do this, but I have no idea on how to store the dead player in a variable. I've tried googling it but nothing comes up related to my question, so I'm asking it here. Can anyone help?

2 comments

0

You don't need to if you use CharacterAdded, it fires when a player respawns or gets a new character.

2 answers

Here is an example...This assumes you already have a Player and Start variable defined somewhere. Also you may need to change the workspace location for your needs. But since CharacterAdded fires on player respawn or player getting a new character, you don't necessarily need a Died event...Hope this is helpful!

Player.CharacterAdded:Connect(function(character)
    if start == false then
        print("They Shall Not Pass")
        character:WaitForChild("Torso").CFrame = CFrame.new(workspace.Lobby.Spawns.Part.Position) -- The wait for child is just in case of lag.
    end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.