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 players to a reserved server? I get the error that the place does not exist?

local TS = game:GetService("TeleportService")
local Players = game:GetService("Players")

while true do
	wait(2)
local code = TS:ReserveServer(5070819696)
local players = Players:GetPlayers()
 
TS:TeleportToPrivateServer(game.PlaceId,code,players)
end 

https://www.roblox.com/games/5070819696/hokyboys-Place-Number-899 -- place pepole should be teleported to

4 comments

0

I think TeleportService don't works on studio, is the code working on the real game?

0

No i tried it in the real game

1

Are you teleporting from one game to another, or in the same game?

0

same game diffrent place

1 answer

✓ Accepted answer

It looks like you are using the same Game ID, you better check your reserved Game ID and try to change it.

local TS = game:GetService("TeleportService")
local Players = game:GetService("Players")

while true do
    wait(2)
local code = TS:ReserveServer(5070819696) --- Same Game ID, put Game ID Reserved. (5070819696)
local players = Players:GetPlayers()

TS:TeleportToPrivateServer(game.PlaceId,code,players)
end 

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