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

Issue while loading assets?

Asked by
Oeplion 15
7 years ago
Edited 7 years ago
assets = {
    131194697, 284055952, 172732271
}
SpawnPosition = Vector3.new(0,0,0)
    wait(5)
    if #assets >= 1 then
    for i = 1, #assets do
        local newItem = game:GetService('InsertService'):LoadAsset(assets[i]):GetChildren()
        if #newItem >= 1 then
        for m = 1, #newItem do
        if newItem[m]:IsA("BasePart") then
            newItem[m].Parent = workspace
            newItem[m].Position = SpawnPosition
        elseif newItem[m]:IsA("Model") then
            newItem[m].Parent = workspace
            newItem[m]:MoveTo(SpawnPosition)
        else
            local model = Instance.new("Model", workspace)
            model.Name = newItem[m].Name
            newItem[m].Parent = model
            model:MoveTo(SpawnPosition) 
            end 
        end
        end
        end
    end

It was working before, but now it's not. Any ideas?

OUTPUT: 12:50:25.750 - Content failed because HTTP 403 (HTTP/1.1 403 Forbidden) 12:50:25.751 - HTTP 403 (HTTP/1.1 403 Forbidden)

0
Can you show us the output it is giving? Is it giving any errors? MrLonely1221 701 — 7y
0
Yes I will show you now. Let me edit the question. Oeplion 15 — 7y
0
I mean It runs on ROBLOX Player, meaning it loads the assets, But part of my script scans the workplace to find the assets and it says that it couldnt find the assets that were loaded. It might be an error on my script, but the assets arent loading when I test it in Studio. Oeplion 15 — 7y
0
Do you have the model? MrLonely1221 701 — 7y
View all comments (6 more)
0
No, I didnt take the model nor did I make it. But it is on sale for Free. Oeplion 15 — 7y
0
Try getting the model then doing it. MrLonely1221 701 — 7y
0
I will try now. Oeplion 15 — 7y
0
Did that work? MrLonely1221 701 — 7y
0
Yep! It worked. I also forgot to define one of my variables. Thank you! Oeplion 15 — 7y
0
No problem. MrLonely1221 701 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

If you also get this problem, get the model so it's in your inventory. I had this same problem the other day and found out the answer after 15 minutes of searching.

Ad

Answer this question