How to create servers and join them?

  • MessagingService is unreliable. During my last test, only 20 out of 40 servers received messages I was sending. But yes, all servers are intended to receive messages from all other servers.
  • You cannot change the joinability of servers. There’s no way to access private player servers other than being invited by the owner.
  • You cannot create public servers, but you can create private servers using TeleportService:ReserveServer. This method will give you an access code and the private server ID of the created server.

Your best pick would be using DataStores to store server data. I use a regular DataStore to store server data and an OrderedDataStore to store the list, when polling I get the list first and then the data for each server.
Note that due to DataStore limits, this is not going to run well if you have > ~100 servers on your game. You should also integrate caching so the server list lookup doesn’t occur more than maybe twice a minute. If you want a more performant and robust service, you’ll have to make a custom server and use HttpService.

Lastly, you can also store the private server access codes received via ReserveServer in this list so that these private servers are also joinable.

12 Likes