Skip to content

Commit cc63eaf

Browse files
authored
Allow :insert command to load 3rd party assets (#2019)
* Allow `:insert` command to load 3rd party assets
1 parent 39d617e commit cc63eaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MainModule/Shared/Service.luau

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ return function(errorHandler, eventChecker, fenceSpecific, env)
13621362
UnallowedCache = {},
13631363
Insert = function(id, rawModel)
13641364
if service.UnallowedCache and service.UnallowedCache[id] then return end
1365-
local model = service.InsertService:LoadAsset(id)
1365+
local model = ({xpcall(function() return nil, service.AssetService:LoadAssetAsync(id) end, warn)})[3] or service.InsertService:LoadAsset(id)
13661366
if not rawModel and model:IsA("Model") and model.Name == "Model" then
13671367
local asset = model:GetChildren()[1]
13681368
asset.Parent = model.Parent

0 commit comments

Comments
 (0)