2 servers share player capacity

I have 2 places in a game:

  1. Lobby
  2. Match

Players spawn in the lobby and then enter the match when a match starts. Players in the lobby and players in the match are in 2 different servers, as they belong to 2 different places. Is there a way for me to get the 2 servers to “share players”. Meaning when a player is teleported from the lobby server to the match server, we still recognise the players to still be inside the lobby server?

Do you mean teleporting only 2 players to the match place? I’m not sure I get what you mean otherwise.

No, what i mean is that when player 1 gets teleported from lobby to match, the lobby server still considers player 1 as part of it’s server.

Cross server communication is possible with this service MessagingService | Roblox Creator Documentation

You could also save a value called after the player’s username in a folder for that one server, but I’m not sure that’d be of any use.

What’s the purpose of keeping the player in the lobby after they teleported if I may ask?

I believe what you’re trying to achieve may be possible using a datastore.

Example simulation of the match server sending data to the lobby server:

The lobby server script holds the user ids / names of the players who were sent to the match server. And then there’s a loop which checks the players’ datastores for information which is uploaded via the match server script.

1 Like

That’s what Messaging Service is intended for, Datastores aren’t primarily used for such things.