I would like to create a player count script that will return the amount of players that are playing within a Place that’s in a Universe.
However, when using something like rprxy.xyz, it returns the amount of players that are playing in the start place. I last tried this around June this year, it didn’t work, and it seems like it still doesn’t.
Here’s my current code:
functions.GetPlayersOnline.OnServerInvoke = function(plr, place_id)
print(plr.Name..":"..place_id)
local web = game.HttpService:GetAsync("https://www.rprxy.xyz/games/"..place_id)
local player_text = string.find(web,"Playing")
local new = string.sub(web,player_text)
local number_start = string.find(new,">")
new = string.sub(new,number_start)
local number_end = string.find(new,"<")
new = string.sub(new,2,number_end-1)
local players_online = string.gsub(new,",","")
return tonumber(players_online)
end
you can use messagingservice, send a message to the place from the start place (i believe), which then you can script getting the player count and return it.
i’m new to messagingservice, so i’m not sure how to engage with it but here’s the link. i’m doing the same thing right now actually lol