How to obtain the TOTAL player count of a Place/Universe

Hello. This is quite an interesting question. I would like to add a player count to my game that shows the amount of players in ALL servers, but I’ve run into some issues.
First, and most obvious, you can’t make direct API requests with Roblox. I figured that out.
Second, I’ve tried using Roproxy, but it returns an HTTP 403 error when tested in game using a different PlaceId.
That leads me to where I am now. Is there another solution to this? I’ve seen posts about self-hosting proxies, but I have no idea how to do that and from the looks of it most services to do so cost money.
All help is appreciated. Thank you!!

You’re correct when you say you’d need to create your own proxy for roblox. Public proxies like roproxy are unreliable a majority of the time (hence the 403 error).

It’s highly unlikely you’re going to find a hosting service for free, and if you did it’d probably be malware. I highly recommend digital ocean, it’s reliable and cheap ($4 subscription per month). To write your own proxy you’d need at least intermediate web development knowledge, so you should find some free resources online to learn from.

Once you finish your proxy you’d access it from studio from an example like this:

Module:

local http = game:GetService("HttpService")
local url = "your-proxy-url"
local moduleScript = {}

function moduleScript:GetAsync(myUrl)
	
	return http:RequestAsync({
		
		Url = url,
		Body = http:JSONEncode({url = myUrl}),
		Headers = {
			["Content-Type"] = "application/json"
		},
		Method = "POST"
		
	}).Body
	
end

return moduleScript

server/client:

local module = require(moduleScript)
module:GetAsync("https://roblox.com")

Unfortunately there isn’t really a quick fix here for you unless I’m unaware of some new roblox proxy tool available.

1 Like

Thanks for your help. Unfortunately, I have no web development experience, and I don’t really want to spend $4 a month to put a game player count in the corner of a menu. Thank you though. If I ever find another reason to use a roblox proxy in the future, I’ll do this. Thanks!

1 Like

I’ve just found this video searching for how to create a proxy, and it doesn’t mention anything about cost since its using Google Scripts. Would this work? Obviously it’s a different use case but I reckon the same principle applies to making a player count

Google scripts is a development kit, not a hosting service. It can take JSON requests, but it’s really only intended for personal use, not for something like constantly making player requests so I imagine google wouldn’t be very happy about that lol. Also, you’d still run into the problem of needing web development knowledge. I also scrolled through the video and it doesn’t really seem like the video uploader knows what he’s talking about and is using some other person’s “proxy kit” so I’d advise caution with that video.

1 Like

Thank you. That’s all I needed to know. I had only skimmed through the video, so I wasn’t sure if the person was coding it themselves or using some other kit. I was mainly asking since the person is using it for a “PLS donate” style game where it’s constantly requesting players’ inventories and stuff like that so I wasn’t sure