Allow InsertService to insert free models in plugins & command bar

Currently, if you attempt to insert a free model from within a plugin or the command bar that you don’t own via InsertService, you will experience an error.

However, I want (and expect) to be able to insert any model from within the Creator Marketplace in Studio.

While GetObjects exists, it does not:

  • Expose the ability to fetch a certain version
  • Yield while fetching, and the functions to remediate this (GetObjectsList and GetObjectsAsync) are RobloxScriptSecurity
  • Provide a consistent experience, uses Content compared to a number when used with InsertService. All while being a somewhat hidden API under DataModel, rather than where you would expect. (The error message should at least reference that it’s here for plugins instead)
3 Likes

I disagree, Instead of using InsertService, Just use game:GetObjects(), It’s like InsertService:LoadAsset() but instead of putting numbers, you instead put "rbxassetid://[assetId]" in the arguments, and it will return the list of instances. You can do for index, value in game:GetObjects("rbxassetid://[assetId]") do so yep

5 Likes

game:GetObjects() doesn’t yield, and it’s counterpart that does, GetObjectsAsync is one you cannot access either. I would also rather everything be under one consistent, documented API.

EDIT: I also don’t see a (clear) way to fetch a specific version from GetObjects, attempting to load (https://assetdelivery.roblox.com/v1/assetId/15239201134/version/1) will fail.

3 Likes
2 Likes

What does game::GetObjects() have to do with inserting free model from the commandbar? Also don’t inject service functions in core.

1 Like

game:GetObjects() also lets you insert free models from the command bar, but it will return an table containing objects inside the model, It’s like InsertService:LoadAsset() but in a slightly different way

2 Likes