im trying to get a few accessories from the catalog by using a table but im not sure how to get multiple accessories for LoadAsset. ty!
script:
local is = game:GetService("InsertService")
local assetIDs = {
86487766,
16343999100,
14925906046,
13397021939
}
local model = is:LoadAsset(assetIDs)
model.Name = "IDs"
model.Parent = game.ReplicatedStorage
You will have to iterate through your table since LoadAsset() only works for one ID at a time… It can’t handle tables. I recommend using a for loop and ipairs for this type of situation.
ohh yes i completely forgot. tysm man! is there any way u could like ungroup the model say and put it all the accessories into ONE model instead of like 4:
this is what i got:
local is = game:GetService("InsertService")
local assetIDs = {
86487766,
16343999100,
14925906046,
13397021939
}
for i, number in ipairs(assetIDs) do
local model = is:LoadAsset(number)
model.Parent = game.ReplicatedStorage
end
edit: actually i suppose ungrouping it works then adding a model manually.
If you do want to mess with putting everything in one model though:
Unfortunately roblox doesn’t have a function to ungroup models, so you will have to create a model instance with Instance.new and add a nested for loop to go through each loaded asset. From there you would need to set the parent to your created model in ReplicatedStorage.