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

How to teleport a group of players to another server?

http://wiki.roblox.com/index.php?title=TeleportService_Guide

I dont want to use GetPlayerPlaceInstanceAsync(userId) because I'm not sure if it will work.

If I use GetPlayerPlaceInstanceAsync(userId) and use the ID of a random player in that server, will it be able to connect the others when logically, that user hasn't even entered the place yet? What if he quits while teleporting? It wont teleport the others.

I also thought about using the server InstanceID but I don't know how to count the servers and send a group to a new instance. Any ideas?

If you're curious to know how the game works, there will be a 1 player lobby, the player chooses a map and he fills in the gaps for the other on going servers. once that round finishes, there will be a map vote and then that whole server will be teleported to a new instance of that map.

Thanks in advance :)

1 answer

✓ Accepted answer

To teleport a full server of players to another server...

for _, Plrs in pairs(game.Players:GetPlayers()) do
game:GetService("TeleportService"):Teleport(PLACEIDHERE, Plrs)
end

to teleport 1 person...

function GT(Plr)
local Pl=game.Players:FindFirstChild(Plr.Name)
game:GetService("TeleportService"):Teleport(PLACEIDHERE, Pl)
end

GT(Orlando777)

To telport a certian game/player...

function GT(Plr,ID)
local Pl=game.Players:FindFirstChild(Plr.Name)
game:GetService("TeleportService"):Teleport(ID, Pl)
end

GT(game.Players.Orlando777,PLACEIDHERE)

8 comments

0

Thanks! Ill try it out.

0

No problem.

0

Quick question, would it teleport that whole server to the same server instance?

0

Or will it split them up?

0

If you have a 6server instance then and you have a 8 player server currently it would teleport 6players to the same instanced server but.. The other to people would HAVE to be teleport to a differant server.

0

By 6server, you mean the player limit?

0

Yes, he does.

0

Yes I mean Player Limit.

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