How do I get my game's place visits?

You can use

local HttpService = game:GetService("HttpService");

local Response = HttpService:RequestAsync({
    Method = "GET";
    Url = string.format("https://games.rprxy.xyz/v1/games?universeIds=%d", game.GameId); --// Send to the rprxy.xyz proxy with the current game's id
});

if (Response.Success and Response.Body) then --// If it succeeded, returned a status code of 200-299, and gave a Body
    local Body = HttpService:JSONDecode(Response.Body) --// Turn the JSON string into a Lua table

    if (Body.data[1]) then --// If we got data for our game
        local Visits = Body.data[1].visits;

        --// Do what you need to
    end
end

I got that here.

Oops, Wrong link --fixed

6 Likes