So I know one game can have multiple places so I was wondering how to teleport multiple people who were in a game queue into their own server that will stop other people from joining once they are all loaded in
COMMUNITY QUESTION
How to teleport people to a Reserved Server?
2 answers
You can use a reserve server.
local TS = game:GetService("TeleportService")
local code = TS:ReserveServer(placeid here)
TS:TeleportToPrivateServer(placeid here, code , player / player table)
It can only be accessed by the 'code'.
EDIT: So this is what I did:
game.Players.PlayerAdded:Connect(function(player)
local TS = game:GetService("TeleportService")
local code = TS:ReserveServer(8357468682)
TS:TeleportToPrivateServer(8357468682,code,player)
end)
But it doesn't work. I don't know what I'm doing wrong, does it need to be a local script? Right now it's a normal script in the workspace folder so I don't know if it needs to be in ServerScriptService or what
1 comment
0
check my comment in my answer.
This discussion is preserved as it was. New answers, comments, and votes are closed.

7 comments
I'm a little confused, I put place id in all the places it said to, and then I just put random numbers for the code, and then I put stoutscientist as player but it didn't teleport me. I assume this is user error
you don't need random numbers for the code. There is the var 'code' and there is the method reserveserver which already returns a code. Just leave the 'code' like that.
and also you cant teleport in studio
It's not working, I edited my answer below so you can see whats happening
make sure its in studio. idk what is happening then.
also, i think it should be a script
wait, noo sorry make sure its in-game not studio