I’m attempting to make a game like hazems player rng, but with games instead. I’m currently facing an issue with getting a games visits count. It is not working. My code:
function GetGameData(TypeOfData, PlaceId)
local universeId = HTTPService:GetAsync("https://apis.roproxy.com/universes/v1/places/" .. PlaceId .. "/universe")
print(universeId)
if TypeOfData == "Visits" then
local success, json = pcall(function()
return HTTPService:GetAsync("https://games.roproxy.com/v1/games?universeIds=" .. universeId)
end)
if success then -- its not successful, since it doesnt print
local response = HTTPService:JsonDecode(json)
local visits = response.data[1].visits
print("visit count: "..visits)
end