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 8 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

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

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

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

this doesn't even print the done.

1 answer

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

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

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

Answer this question