I want to get the number of players in a reserved server. Should I use MessagingService to accomplish this? I’m having trouble with how to go about making this player count. Any help is appreciated or even examples of how I would do this, thank you.
Player creates server:
- uses TeleportService:ReserveServer(placeid) and stores the accesscode to the player’s userid.
- expires in a month (os.time() + seconds_in_month)
DATASTORE:SetAsync(userid, {
[“accesscode”] = access_from_reservedserver,
[“expiration”] = os.time() + seconds_in_month
})
Player joining other servers:
-Checks if username inputted has a server and it is not expired. If not expired, uses TeleportToPrivateServer(placeid, accesscode_from_players_data, {player})
-Uses :RemoveAsync(player_requested_id) if it is expired