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

inserting model with insertservice, why is it not working?

Asked by 8 years ago

i keep getting this error Content failed because HTTP 404 (HTTP/1.1 404 http://www.roblox.com/asset/default.ashx?id=0)

i'm using the script from the wiki and i have http enabled

local model = script.Parent
while not script.Parent:FindFirstChild("Version") do wait(0) end;
local modelVersion = model.Version.Value;
local modelID = 0101010101 -- Change this to the model id of the model you created earlier

function checkForUpdate()
    -- Get the newest version of the model from the catalog
    local newModel = game:GetService("InsertService"):LoadAsset(modelID)

    -- If the catalog model is newer than the one in game
    if newModel and newModel:FindFirstChild("Version") and newModel.Version:IsA("IntValue") and newModel.Version.Value > modelVersion then
         -- Replace it
         newModel.Parent = model.Parent
         model:Destroy()
    end
end

-- Once the asset is loaded into the ROBLOX cache, it will always be the same.  Only call this once.  
checkForUpdate()
0
Erm. It looks like you never established an id for "AssetIdNumberofmyModel". That should preobablybe why you're getting the error... minikitkat 687 — 8y
0
in the script in my game actually used the real id there, i just didn't want to post the id number here because the model isn't ready for public use. johnnygadget 50 — 8y

Answer this question