This is part of my script.
--Chunk
local model = game:GetChildren("InsertService"):LoadAsset(modelid):GetChildren()[1]
--Chunk
This is part of my script.
--Chunk
local model = game:GetChildren("InsertService"):LoadAsset(modelid):GetChildren()[1]
--Chunk
EDIT
It may also be not working, because of how you used GetChildren().
GetChildren() "Returns a read-only table of the object's children." It can't be used to find a specific child, it returns a table. Instead, since you're looking for a Service, try using the GetService() function, so instead of
game:GetChildren("InsertService"):LoadAsset(modelid):GetChildren()[1]
-- use this:
game:GetService("InsertService"):LoadAsset(modelid):GetChildren()[1]
If that's not the only problem, it might be because of the Asset you tried to load.
When you use LoadAsset, remember,
Some virus scripts are automatically deleted when a model is loaded.
LoadAsset cannot be used offline (in Studio Play or Studio Start Server/Start Player).
If called from a Script, the model must be in the inventory of the user ROBLOX or the creator of the place inserting it. If called from a LocalScript, the model must be created by ROBLOX or the place creator.
If none of these are the reason why, maybe you just forgot to set the Variable modelid.
Here's a helpful link!
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
I know how to use loadasset I used it 100 times before, I just derped.