I'm using HTTPS Service to get the RAP of a roblox account, but I'm getting an error message passed through my pcall saying "HttpError: DnsResolve".
I searched up a solution where i flushed my DNS, but it hasn't changed anything.
Here's my code:
local function GetTotalRAP(player)
local userId = player.UserId
local success, msg = pcall(function()
local total = 0
local function CollectRAP(cursor)
local url = "https://inventory.rprxy.xyz/v1/users/" .. userId .. "/assets/collectibles?sortOrder=Asc&limit=100"
if cursor then
url = url .. "&cursor=" .. cursor
end
local data = HttpService:GetAsync(url)
data = HttpService:JSONDecode(data)
print('data')
print(#data["data"])
for i = 1, #data["data"] do
pcall(function()
total = total + data["data"][i]["recentAveragePrice"]
print(i)
end)
end
if data["nextPageCursor"] then
CollectRAP(data["nextPageCursor"])
end
print("done")
end
CollectRAP()
return total
end)
if not success then
warn(msg)
else
print("success")
return msg
end
end