Before a player joins a reserved server, I need to make sure there are open slots. If there aren’t, then it will create a new reserved server, if there are, then the player will be placed into that slot. However, when the player makes a reserved server I save the access code in the GlobalDataStore in the main game so that other players can join it from other servers. But when the player leaves the reserved server or another player joins, I need it to ping the main game, informing it how many players there are.
Player leaves or a player joins the game, events fire:
- Pings the server how many players are in the game via MessageService.
I’m having two issues with that.
In the main game, it saves the access code, but when the player joins and I print out the access code (In the new reserved server), it is a completely different access code. (So when I ping the main server via MessageService it’s getting a different Access Code then the one it saved in the main game.)
In the MessageService, you can send data. But how do I send two different messages in the ping: For example, I need to send over the Access Code and the Player list. This way it knows which Reserved Server it’s getting pinged from.