Hello there, i need help,
i made a player inventory that shows all your limiteds you own. I cannot send requests to ROBLOX API so i used proxies, but i get the error: “Name” is not a valid member of assetType.
Can someone fix it, thanks!
Here is the script.
local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local playeri = Players:GetUserIdFromNameAsync("Florentin5434")
local player = Players:GetPlayerByUserId(playeri)
local url = string.format("https://inventory.roproxy.com/v1/users/%d/assets/collectibles?sortOrder=Desc&limit=100", player.UserId)
local response = HttpService:RequestAsync({
Url = url,
Method = "GET",
Headers = {
["Content-Type"] = "application/json",
["Accept"] = "application/json"
}
})
if response.Success then
local responseBody = HttpService:JSONDecode(response.Body)
for _, asset in ipairs(responseBody.data) do
if asset.assetType.Name == "Limited" then
print(asset.Name)
end
end
else
warn("Error retrieving inventory data:", response.StatusMessage)
end
local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local playeri = Players:GetUserIdFromNameAsync("Florentin5434")
local player = Players:GetPlayerByUserId(playeri)
local url = string.format("https://inventory.roproxy.com/v1/users/%d/assets/collectibles?sortOrder=Desc&limit=100", player.UserId)
local response = HttpService:RequestAsync({
Url = url,
Method = "GET",
Headers = {
["Content-Type"] = "application/json",
["Accept"] = "application/json"
}
})
if response.Success then
local responseBody = HttpService:JSONDecode(response.Body)
for _, asset in responseBody.data do
print(asset.name)
end
else
warn("Error retrieving inventory data:", response.StatusMessage)
end
You have already filtered it so that only collectibles are shown in the URL.
You should use the Rolimon’s API to get significant details on the player, as well as their limiteds. From the look of it, it’s most likely easy to use.