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

How would I teleport players without killing them?

Asked by
Resnex 60
10 years ago

So far, I have this:

game.Workspace.PLAYER1NAMEHERE.Torso.Position = game.Workspace.PLAYER2NAMEHERE.Torso.Position

But when I tested it, Player 1 died, but his torso successfully teleported to Player 2. I thought that the Torso would come with the body, but obviously that failed.

Any ideas?

3 answers

Log in to vote
3
Answered by
Sublimus 992 Moderation Voter
10 years ago

Use :MoveTo()

game.Workspace.PLAYER1NAMEHERE:MoveTo(game.Workspace.PLAYER2NAMEHERE.Torso.Position)
0
Thanks! Resnex 60 — 10y
1
No problem! Sublimus 992 — 10y
Ad
Log in to vote
0
Answered by
yurhomi10 192
10 years ago

Instead of using position, try using CFrame

game.Players.Player1.Character.Torso.CFrame = CFrame.new(1,1,1)
Log in to vote
0
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
10 years ago
game.Workspace.PLAYER1NAMEHERE.Torso.CFrame = game.Workspace.PLAYER2NAMEHERE.Torso.CFrame

Just a simple edit, CFrame works, position doesn't.

Answer this question