Alright, I managed to find out how to apply Isocortex’s solution and it’s working perfectly!
Here is the code for the fellow programmers that come across this post in the future :
local httpService = game:GetService("HttpService")
local gamesUrl = "https://games.rprxy.xyz/v2/users"
local visitsUrl = "https://games.rprxy.xyz/v1/games?universeIds="
local gamesData = httpService:GetAsync(gamesUrl .. "/"..player.UserId.."/games?accessFilter=Public&sortOrder=Asc&limit=100")
gamesData = httpService:JSONDecode(gamesData)
gamesData = gamesData.data
local totalVisits = 0
for i=1,#gamesData do
local gameId = gamesData[i].id
local visitsData = httpService:GetAsync(visitsUrl..gameId)
visitsData = httpService:JSONDecode(visitsData)
visitsData = visitsData.data
totalVisits=totalVisits+visitsData[1].visits
wait()
end
print(totalVisits)
Problem solved!
Thank you all very much for your replies ![]()