Loading Third-Party Model Assets In-Experience

Hi Creators,

For many years, InsertService:LoadAsset(assetId) allowed loading Model assets into an experience as long as they were in your Inventory or the asset creator explicitly granted you permission. We’ve heard your requests to lift these restrictions. In response, we’ve made two changes:

  • We’ve added a Game Setting, Security > Allow Loading Third Party Assets, disabled by default
  • We’ve added AssetService:LoadAssetAsync(id), which will eventually replace InsertService.LoadAsset(id)

Note LoadAssetAsync can load any Asset-types that contain Instances - Models, MeshParts, Decals, Animations, and more.

The new LoadAssetAsync method can load Free Models not in your Inventory as long as the Third Party Assets security setting is enabled. Note, LoadAssetAsync disables Script execution inside any Model it returns, even if you own the Asset. LoadAssetAsync returns a Model with Sandboxed = true, without any script execution Capabilities granted. You can configure whether the Model can execute Scripts and which Capabilities are granted using the Script Capabilities API.

Allowing Third Party Models does not apply to InsertService:LoadAsset(assetId). The new LoadAssetAsync API is generally preferred over LoadAsset for its added security. LoadAsset will remain functional but we will eventually mark it deprecated in favor of LoadAssetAsync.

load-treehouse-3

Safe Usage of Models

Roblox supports a wide range of UGC experiences with dynamic content built by players.

However, you should make the following considerations:

  • Some Free Models contain malicious scripts that Roblox can’t always detect automatically. If you grant Script Capabilities to loaded Models, you increase the risk of bad content in your experience.
  • Roblox moderates Models both proactively and in response to reports, but this process is not guaranteed. If you limit the Models your experience loads, for example to Models you’ve vetted, risk of bad content is lower. If you let players influence the experience to load arbitrary Models, the risk of bad content is higher.

In general, if a significant portion of users in an experience violate Roblox Terms we may ask the experience creator to take action, or we may take the experience down. Creators are responsible for ensuring their experience complies with its content maturity rating and players are kept safe.

We hope this feature enables you to include more interesting content in your experiences. We’re looking for feedback! What do you want to use this for, and are there any other features you need? Thank you!

153 Likes

The documentation for LoadAssetAsync will be up on our docs site within a couple days. For now we’ll summarize it here:

AssetService:LoadAssetAsync(assetId)

  • parameters: assetId - the asset ID number of the asset being loaded.
  • returns: a Model containing the asset contents. The Model is Sandboxed (see below).

image

The root Model returned by this function is Sandboxed so Scripts within it cannot run.

This is equivalent to running

rootModel = AssetService:LoadAssetAsync(12345)
rootModel.Sandboxed = true
rootModel.Capabilities = SecurityCapabilities.new() -- zero permissions granted
-- ^ this is automatically applied to every Model returned by LoadAssetAsync
38 Likes

This topic was automatically opened after 11 minutes.

I can see this being used for custom maps in games. That’s pretty neat.

But Roblox clearly detects said free models immediately when I save my game, and immediately terminates the account. Pretty weird, huh? I thought you said you couldn’t detect everything.

Awesome, that’s good. In the case you for some reason do want scripts to be able to run in some capacity, is that possible too?


Also, I saw someone else typing and after they sent the post it got immediately changed to having been sent by Homeomorph. Why? What happened there?

6 Likes

For a long time I’ve wanted to add modding support to my experience, Oaklands. I’ve already created a prototype of an entire modloader for another project (this uses Roblox’s new Sandbox capabilities and it is INCREDIBLY powerful). I’m super excited to create some awesome technology with this, the possibilities are endless!!! I really hope more creators push towards supporting user-generated-content, it’s a gold mine of opportunities.

10 Likes

Oh my gosh. INSERT WARS IS BACK!

26 Likes

Wahoo! If this is 100% safe to use then this could allow for cool things like custom maps or even mods in games.

If you want a sandbox game where players can make their own mods, you could design a system where an object’s behavior is based on tags and attributes that are attached to it for instance.

Allows for some semi-scriptable behavior without actually having to write code if done right.
Plus, should prevent people from using viruses in your game.

I assume that with this system I can also still load models from my own inventory?
Useful for if you have a game with a huge load of maps that are too big for server storage.
Just load the maps from your inventory.

6 Likes

S̶t̶e̶a̶l̶i̶n̶g̶ Borrowing this game idea before u can.

4 Likes

This is awesome! I see great things and new types of games that can be formed with this. I’m loving some of these updates!

1 Like

Unless I’m overestimating the Capabilities API, you could also allow ModuleScripts that have just enough permissions to return a script in a DSL language you write.

3 Likes

biggest update in many years. unbelievable

1 Like

Your example is very broad/vague and biased. Have you actually gone to the effort of confirming that it’s any free model you inserted and not just specific ones of which they are already aware of and would have in some kind of detection database?

And additionally if there is even any such database how can you confirm these free models weren’t uploaded prior to it becoming a known thing to look out for?

3 Likes

I’m pretty intrigued about this as well, I have a building game and with this I might be able to let people import their own studio builds as long as they follow certain constraints. This opens up a ton of possibilities for players.

Please please complete the loop now, I want to let players save builds out to their inventory, and be able to insert them back into the game. I think the API for this has been disabled, maybe due to permission/policy issues? Please revisit this. :pleading_face: https://create.roblox.com/docs/reference/engine/classes/AssetService#PromptCreateAssetAsync

10 Likes

It seems that you can change the sandbox permissions of the new model to allow scripts to run.

4 Likes

this is an awesome update and will be something huge for me and my team. Its great to see the script ejection turned off and even in circumstances where malicious scripts can get through I can only see them being in use to be obfuscated sleeper code that would only be useful in the event of an already existing backdoor. good stuff!!!

2 Likes

Nice, just a few days ago I started thinking what I could use something like this for

2 Likes

Will there be a parameter added that would allow you to make it not sandboxed by default, or will we have to do that manually?

5 Likes

Looking at this, at some point will models have age ratings themselves to help us keep how this is used to be correct and in line with the rules?

Also considering what could be possible with this, if we allow users to do this in our games does that mean it needs to be classed as the free-form content descriptor?

8 Likes

alongside this, i hope decals get age ratings. This was my next question on the AMA with Kaufman (“Will individual assets have age ratings, similar to experiences?”) but I didn’t have time to ask it. Hopefully another AMA happens soon!

3 Likes

I think this might be the first objectively good change that potentially everyone can agree on in years.

7 Likes