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

How to teleport a group of players to another server?

Asked by 9 years ago

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

Log in to vote
0
Answered by 9 years ago

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)
0
Thanks! Ill try it out. Orlando777 315 — 9y
0
No problem. MessorAdmin 598 — 9y
0
Quick question, would it teleport that whole server to the same server instance? Orlando777 315 — 9y
0
Or will it split them up? Orlando777 315 — 9y
View all comments (4 more)
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. MessorAdmin 598 — 9y
0
By 6server, you mean the player limit? Orlando777 315 — 9y
0
Yes, he does. Shawnyg 4330 — 9y
0
Yes I mean Player Limit. MessorAdmin 598 — 9y
Ad

Answer this question