So i've been looking through the wiki, and i found AssetService. I've been trying to use GetAssetIdsForPackage but it won't work. Example:
game:GetService("AssetService"):GetAssetIdsForPackage(193700907)
It doesn't seem to work. Am i doing something wrong here
AssetService:GetAssetIdsForPackage() returns an array of int64 values (asset IDs), so you'll need to insert all of the IDs returned from the function.
function insertpackage(id,parent) local IDs = game:GetService('AssetService'):GetAssetIdsForPackage(id) for _, v in pairs(IDs) do game:GetService('InsertService'):LoadAsset(v):GetChildren()[1].Parent=parent end end insertpackage(193700907, workspace)
Try running the following code in the command bar in Studio.
for _, id in pairs(game:GetService("AssetService"):GetAssetIdsForPackage(193700907)) do local model = game:GetService("InsertService"):LoadAsset(id).Parent model.Name = tostring(id) model.Parent = game.Workspace end