Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

why do i keep getting an error ?

Asked by 10 years ago

the script works fine its just sometimes i get this error

14:42:42.518 - MarketplaceService::getProductInfo() an error occured while parsing web response 14:42:42.519 - Script 'Workspace.Script', Line 10 - global loadValues 14:42:42.521 - Script 'Workspace.Script', Line 49 14:42:42.522 - Stack End

function setMessageVisibility(objects, visible)
    for _, object in pairs(objects) do
        object.Visible = visible
    end
end

function loadValues(values, parent)
    for _, value in ipairs(values) do
        wait(0.1)
        local Asset = game:GetService("MarketplaceService"):GetProductInfo(value)
        local n = script.Parent.Value:Clone()
        n.Name = Asset.Name
        n.Value = value
        n.Parent = parent
    end
end
----------------------------------------------------------------
game.Players.PlayerAdded:connect(function(player)   
local pack = Instance.new("Model",game.Lighting)
local inv = Instance.new("Model")
local holder = Instance.new("Model")
local faces = Instance.new("Model")
local clothes = Instance.new("Model")
faces.Name = "faces"
clothes.Name = "clothes"
inv.Name = "inventory"
holder.Name = "holder"
faces.Parent = pack
clothes.Parent = pack
inv.Parent = pack
holder.Parent = pack
pack.Name = player.Name.."sPack"
----------------------------------------------------------------
print'loading inventory items'
local valueListF = {"130213380","110336757","128992838","8329686","23932048","150182466","19264845","20722130","7074836","13038375","116042990","21024661","30394594","10907541","119812659","16101765","31117267","7076076","20418682","7131361","110207471","141728790","7074944","34764447","51241480","134522901","23644960","20418658","110288809","51241522","22877700","8560971","26424808","8560975","10860397","8329679","16132514","162200696","21311601","15432080","7074864","7699177","66330295","26619096","173789324","30394484","10907549","23264604","19398554","162068415","27599954","10907529","18151826","7074893","21635565","119812738","33321848","7075434","7131886","23219981","45084008","14861743","162200633","29109681","32058239","10527010","14030577","20612949","19366445","20010377","15637848","10907551","23261769","150182501","20337343","133360789","12732366","7317765","21635583","66330106","22828351","119812715","12188176","12145328","12467159","10860384","15885121","162200666","32873408","10770432","28999228","7075469","29532363","66330060","35168581","10831454","15324577","19396123","21802396","147144644","49045351","173789114","14516578","30394850","34673712","10831558","15054426","22500129","159199178","14812981","12145366","11389441","15471035","26260927","20644021","45515121","51241171","27861352","20909103","32723404","27134344","27725434","29348122","7076224","7317793"
}
local valueList = {
"172309919", "1029025", "135470963", "188664226", "190786130", "190786046", "191098660", "60115635", "151784320", "16630147","188702967", "190204972", "17424092", "1563352","133553855", "18757806", "13745548", "17877340", "39247441", "188703294", "1073690","170892848", "172309861", "60675871", "14815761", "13476917", "15967743", "29952810","140469731", "164482409", "63994465", "15913848", "185812297", "187846561", "11188696", "139618317","48039359","62246484","125369932","68325607","175136000","47702745","67200948","163524136","188703010","135470710","62745990","185893592","1374269","63689493","168167316","153955396","99860652","136791461","81722657","153955895","139589487","136790950","46302558","64444871","68258723","1286490","128159108","1158416","96103379","20573086","39247498","52554739","29051524","23705521","22546563","42211680","1285307","1235488","162067148","1323384","135470997","1272714","138932314","63043890","21070012","11748356","20980138","188888052","72082328","31101391","48545806","100929604"
}
local valueListC = {"169716851","169717184","180574520","180616210"
}


function getMyPack()
    return game.Lighting:FindFirstChild(player.Name .. "sPack")
end
    local pack = getMyPack()

    loadValues(valueList, pack.holder)
    loadValues(valueListF, pack.faces)
    loadValues(valueListC, pack.clothes)

    print("finished!!")
    script.Parent.check.Value = 0
end)

Answer this question