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

How do you teleport players?

Asked by 8 years ago

Hello, I'm wondering how do you teleport players to certain locations like. Player spawns at lobby, teleports to map1, comes back to lobby, teleports to map2 etc.

0
wrong @ axovua he wants to use MoveTo property or Cframe the torso of all players in the game to a location in the server map. scottmike0 40 — 8y

1 answer

Log in to vote
0
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
8 years ago

To teleport a player, simply CFrame their torso.

local player = "Goulstem"

workspace[player].Torso.CFrame = CFrame.new(0,100,0)

To teleport multiple players, iterate through them all and CFrame their torsos

for _,v in next,game.Players:GetPlayers()
    v.Character.Torso.CFrame = CFrame.new(0,100,0)
end
0
rather than a position such as 100, just use the position of the part in the map + 5 or the y valu scottmike0 40 — 8y
Ad

Answer this question