I’m trying to add shirts to an avatar editor I found, but I need a reliable way to get a table of shirts. This is the script I tried:
local Http = game:GetService("HttpService")
local subcategory = 11
local url = "https://search.roblox.com/catalog/json?Subcategory=" .. subcategory .. "&IncludeNotForSale=true&ResultsPerPage=60&PageNumber="
local pages = 25
local assets = {}
for i = 1, pages do
local urlPage = url .. i
local data = Http:JSONEncode(Http:GetAsync(urlPage))
data = Http:JSONDecode(data)
for ii = 1, #data do
local asset = data[ii]
local id = asset.AssetId
local name = asset.Name
assets[#assets + 1] = "{Id = " ..id .. ", Name = \"" .. name .. "\"}"
end
print(i)
end
It wouldn’t let me print the data.