Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there a really easy way to teleport all the players in a game or server to another game?

I need to have a way to teleport all players from one game to another manually all at once.

1 answer

You can. Using ipairs loop would get all the players and teleport them to a game.

local placeid = 0000000000 -- Replace this to your target gameId.

for i, v in ipairs(game:GetService("Players"):GetPlayers()) do
	game:GetService("TeleportService"):Teleport(placeid, v)
end

7 comments

0

Make sure your game and your target game is published. Some games might block TeleportService teleports to his game.

0

i kind of forgot how that kind of loop works is this something i can somehow activate in the game or something

0

No, ipairs is an advanced loop, like you can use for loop, but this is way better.

0

You can check out ipairs in Roblox Developer Hub. Thanks for reading!

0

so what should i do if i want to be able to easily call some type of function in my game to teleport all to that id

0

i wouldnt even mind just using some free admin command thing but for hd admin you can only move people between your games and i want to do it to my brothers game

0

I though you mean you want to do that? I did? What do you mean easily call? That works either.

This discussion is preserved as it was. New answers, comments, and votes are closed.