Making a Lobby System

I am working on an escape room game.

The goal is to add a little pad, that players stand on to enter the join queue. How would I make it, that the people that are on the queue, will join into a place for the escape room? Also, I need it so that Players in the queue will get sent to their own server.
Im rather new to scripting, and i am very stumped.


This is not a request site, please read the rules

i shoulda been more clear; i am really just asking to be pointed in the right direction


I can’t give you a whole system, but this is how I would go about it:
Make a touch pad.
Put a script in the touch pad that when touched, teleports to the Place that has the escape room.
Local TeleportService = game:GetService("TeleportService")
local EscapeRoomID = game id
Just make it so on Touched event it teleports you to EscapeRoomID
Then make sure the max players per server on the escape room place is set to 1.

You can add timers, etc. but this is the bare concept.
I hope this helps? :slightly_smiling_face:

For more, you can check here: Teleporting Between Places | Documentation - Roblox Creator Hub

Try searching Google and YouTube for tutorials. The DevForum is not a place to ask for scripts, etc.

Ok, you will need to add variables inside a script inside the touch pad like this

local TeleportService = game:GetService("TeleportService")
local EscapeRoomID = -- Set this to the place id of your escape room
-- If you're looking for multiple players to teleport you will need to make a table and insert the player that touched the pad into that table. Then once the timer is done. Players who are in the table will be teleported to a private server.
local ReservedServerCode = TeleportService:ReserveServer(EscapeRoomID) -- Creates an access code for teleporting players.
local PlayersInQue = {}

-- Now create a touched event that adds the player who touched the pad into the table and players who touch an exit que part get removed from the table

-- When the timer ends, teleport players to a private escape room server.
TeleportService:TeleportToPrivateServer(EscapeRoomID, ReservedServerCode, PlayersInQue) 

This is the basic code needed to teleport players and I tried to explain how you would go about doing this in an easy fashion, this code will not work since you need to be the one to add timers, touched events, optional gui, and any other things you want such as teleporting players to a waiting que room when they touch the pad or anything like that. I wanted to make this easy to understand and let you do the actual work so that you learn.


you just saved me. thank you so much

1 Like

Hey, I am working on adding the timer and table.insert. While testing, i am getting the error, Argument 1, missing or nil. I am getting the error for this line:
local ReservedServerCode = TeleportService:ReserveServer()

You need to put in the id of the place you want to reserve a server for sorry.
:ReserveServer(YourPlaceID). So sorry about that I forgot to add that into my post lol. When it says “Argument missing or nil”, it means that there is something you need to put in the function that you didn’t put.

1 Like