Teleporting Players To/From Game

Okay so for my game, after the lobby I want to teleport everyone to the game and after the game is finished I’d like to bring them back, but I do not know how you teleport a player. If you could help me please post something.

1 Like
1 Like

Is that for teleporting plays to like a new game, because that is what it sounds like that it is saying.

That is teleporting players from one game to another. Do you want to teleport players somewhere within one game?

Oh! I know what you’d want to do
Use a pairs loop to get the players, then use MoveTo() to teleport them there and back.

Yes, that is what I’m trying to do.

Idk anything about the MoveTo()

It is a Method of Model. U can use it to move a Model somewhere. It accepts a Vector3

could you give me a small example of how you would use it please?

You can loop through all the players, and use :MoveTo() to move their characters to a certain place.

for i,v in pairs(game.Players:GetPlayers()) do
   if v.Character and v.Character:FindFirstChild("HumanoidRootPart") do
       v.Character:MoveTo(Vector3.new(0, 0, 0)) -- change 0, 0, 0 to a vector3 position
   end
end
1 Like

Okay, that should work for what I’m doing, and thanks to all of you for helping me.