Get number of players and servers in different place

Hey, I’m trying to make a display in one game that shows the amount of servers and total player count in a different place. I’m not sure how to get those numbers though. I have checked around in devforum, but I don’t understand the posts that well. If you have any questions feel free to ask.

1 Like
local decodedBody = httpService:JSONDecode(('https://games.rprxy.xyz/v1/games?universeIds=100').body)

local active = decodedBody.data[1].playing

This is code for getting the total player count for a game.

local decodedBody = httpService:JSONDecode('https://games.rprxy.xyz/v1/games?universeIds=100').body)

local active = decodedBody.data[1].playing

local maxPlayers = decodedBody.data[1].maxPlayers

local servers = active / maxPlayers

My solution for getting the servers is just getting how many players are playing, and then dividing by max players per server. This will work, probs not 100% accurate but getting all servers is a bit hard using roblox’s API.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.