local TS = game:GetService("TeleportService")
local Players = game:GetService("Players")
local placeID = 5002451166
local code = TS:ReserveServer(game.placeID) -- Returns a code
local players = Players:GetPlayers() -- Get a list of all players
TS:TeleportToPrivateServer(game.placeID,code,players) -- Actually teleport the players
-------I am testing this in a real game, not in roblox studio by the way.----
So this script is meant to run when a player joins the "lobby" Place in my Game. It should wait 10 seconds, then teleport the players in that lobby server to the map. (the map is a seperate Place in my Game, btw)

17 comments
What is "game.5002451166" for?
its the id of the game that i want the players to be teleported to.
try to replace it with "5002451166"
aight thx
yeah that didnt work
u said u are testing ingame, press f9 (output key) what is in it?
btw game.placeId wont teleport you
it said no messages were found
what will teleport me to that place's id?
just replace "game.placeID" with "placeID"
aight
look: In the "placeID" variable you put the placeId where u want to teleport, then u write "TS:ReserveServer(placeID)" and TS:TeleportToPrivateServer(placeID,code,players)
ohh dang I understand something wrong sryyyyy
Let me write an answer xD
okie
u done? thx :)
u done? thx :)