Live player counter from different place

Hi! I want to achieve this cool live player counter on a textlabel in a UI. But i don’t know how i would get the amount of players playing in a different Place/Experience. Here’s how the script kinda looks like now:

local Place_ID = 11356217115
        
local Live_Players = ?
        
local Player_Counter = Gamemodes_Frame.Normal.Players_Online
Player_Counter.Text = Live_Players .. " PLAYING"

I will add an additional loop to make it update each 30 seconds later, but does anyone know how i would kinda get this to work? And maybe without having to use API’s?

1 Like

I’m not that good at scripting but here’s a suggestion. Try looking into GetPlayers. I know this obviously breaks your rules but it’s all I can say.

That’s the problem… I’m not looking to get the players in the current game, but from another place.

So can it still use the API or no?

Yes, sure. I have my own proxy

you can use this Games Api api with a proxy to get the player count

example:

https://games.roblox.com/v1/games?universeIds=1686885941

code snippet:

local proxyReturn = json -- here is where you use your proxy to get the api
local http = game:GetService("HttpService")

local count = http:JSONDecode(proxyReturn)["data"][1]["playing"]

print(count)
1 Like

You’re going to have to use an api like @robeatsdeath said.

I came across this api that allows you to get a game’s info with the universe id.

https://games.roblox.com/v1/games?universeIds=[UNIVERSE_ID_HERE]

Then look at the playing count.

1 Like

Any other API but with a PlaceId instead of universeId? :slight_smile:

Sadly not, roblox only supports universe ids for most apis now

2 Likes

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