Hello,
You can do this very easily with the HttpService using a webapi
The games api does this perfectly.
To do this ingame, you could do something like:
local HttpService = game:GetService("HttpService")
local universeId = 445
local response
pcall(function()
response = HttpService:GetAsync("https://games.rprxy.xyz/v1/games?universeIds=".. universeId)
end)
if response ~= nil then
local data = HttpService:JSONDecode(response)
local playing = data["data"][1]["playing"]
print(playing)
end
You have to use a roblox proxy because otherwise, you will get a "Trust check failed" error
A universeId is not a placeId. There is a distinct difference. A placeId is the id for the entire game, as you can have multiple places inside one game. A universeId is the id for a place inside the game.
Tonge twister, I know.
You can get these universeIds with another api service:
https://api.roblox.com/Marketplace/ProductInfo?assetId=
Anyway, hope this helps,
If it does, please press the Accept Answer button,
Tweakified
1 comment
Contact me on discord : Vitrox#0329