How would i go about making a lobby system, similar to Phasmophobia?

So, i dont mess around with TeleportService or MessagingService much at all, and i was wondering how to make a Lobby system similar to Phasmophobias lobby system.

In case you havent played or seen Phasmophobia, the lobby system works like this:
Upon opening the game, you can either create a new public lobby or a private lobby, or play single player.
If you create a public lobby, other people can see and join that lobby through the main menu.
If you create a private lobby, you have to give people a lobby code to join the lobby.

Things i am not sure on how to do, and would appreciate explanations on are:
Checking private lobby codes
Joining private lobbies if the code is correct
When creating lobbies, only joining a server with no one in it, but allows people to join upon being teleported directly to it.

I am not asking for an entire system to be scripted, instead i just need some explanation on how to do the things listed above, and i could script it from there.

(im editing on here, i did look on the devforum before posting this, i didnt find anything, and i dont trust youtube for scripting tutorials)

2nd edit:
I worded this pretty badly, im going to reword it here:
I want to have 2 places for the lobby system, one where you can join the lobbies, and another that you get teleported to that is the actual lobby.

3rd edit:
Upon thinking for a little, i do have an idea on how to do a quarter of it.
(For private lobby)
When the server is reserved, a server code gets created, if i send that server code to the reserved server, that would allow for other people to join the reserved server, however, how i do
Basegame1 (with lobby code) > ReservedServer > Basegame1 (with reservedserver code from ReservedServer)
is unknown to me.

3 Likes

Assuming the Lobby information is stored on the server’s side:

Joining Lobbies:
You could use a Remote Event to Join the Lobby and then depending on whether it’s private or not, check if the code provided is the correct code?

I don’t know what you meant by the last two, could you explain further?

1 Like

What i am specifically looking for, is having the Start Place being the main menu, and a different place being the lobby, thats why i would need to use TeleportService and MessagingService instead of RemoteEvents and RemoteFunctions.

You said going around making a Lobby system, you would have to have “Create Server”, “Join Server”, “Leave Server” Options. Then after that a start button which would then, upon clicking, would teleport all players to the “main game”

You can still use Remote Events for the Lobby System whether you need to use Teleport Service or not?

I have explained this very poorly, let me try again.

  1. The main menu has a player limit of 1 (only 1 person per server)
  2. Through the main menu, you can join lobbies which will teleport you to a differnt place, where the host can well, host the game, when a “round” is started in the lobby, you get teleported to another place, which holds the actual game, the main gameplay of the game.

essentially, 2 different places for the lobby sytem, and many others for the actual game.

1 Like

If I understood correctly you could use Reserve Server.

I understand the ReserveServer function, however i would need to know how to have game codes that allow for other people to join said reserved server, as it will only teleport on person into the reserved server.
That is where i would assume MessagingService comes in, but i dont understand how to use it at all, especially for this kind of system.

This kind of lobby system has been done before too, so here is a game that does have the system, and basically i want to replicate it.

This video might help