My goal is to find every gear in the catalog by looping through every id and deciding if its a gear or not and this is my code
local MarketPlaceService = game:GetService("MarketplaceService")
local Id = 0
local TargetId = MarketPlaceService:GetProductInfo(34234)
spawn(function()
while true do
Id += 1
pcall(function()
TargetId = MarketPlaceService:GetProductInfo(Id)
end)
if TargetId.AssetTypeId == 19 then
print("Is a gear: " .. Id .. " ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------")
else
print("False")
end
end
end)
my problem is that it is running incredibly slow because of the pcall