Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to teleport a player after they respawn?

Asked by 7 years ago

I'm not talking about the spawn part. I need every player to be put to different points while they're on the same team. Here's what I've got

player.Character.Humanoid.Died:connect(function()
    player.Character.Torso.CFrame = CFrame.new(x,y,z)
end)

This does nothing and gives no errors. I then tried adding a wait and still nothing happens


player.Character.Humanoid.Died:connect(function() wait(10) print("done") player.Character.Torso.CFrame = CFrame.new(x,y,z) end)

this doesn't even print the done.

1 answer

Log in to vote
0
Answered by
Versimn 20
7 years ago
Edited 7 years ago

My guess is because you connected it to when a humanoid dies. What you want to do is:

player.CharacterAdded:connect(function()
    player.Character.Torso.CFrame=CFrame.new(x,y,z)
end)
Ad

Answer this question