So for my game I wanna have a hub and it'll have a list of all the servers. How do I do that and how do I use TeleportService to teleport them to a specific server? Also how do I get the properties of the server. Such as how many players are in and who are the players.
DataStores
We checked, and there doesn't appear to be an API for getting the server lists for a game, either inside or outside of a game. At that, there's not really any good ways to store specific data for servers inside of DataStores. What you can do however use use the ReserveServer
method of TeleportService in conjunction with TeleportToPrivateServer
because the returned access code is serializable and suitable for storage in DataStores.
Once you have the access code, add it to a table in a DataStore. To get the list of servers available, just get the list from the datastore and iterate through it.