InsertService¶
Used to insert assets from the Roblox website.
Description¶
InsertService is used to insert assets from the Roblox website, typically the LoadAsset function.
To load an asset, it must be accessible by the creator of the experience loading it, which can be either a user or group. Should an experience be uploaded by a different creator, the asset data would not be accessible. See the LoadAsset() method for more details on this security check. Note that you should not use this service for loading API keys or other secrets. Use HttpService.GetSecret() instead.
See Also¶
- AssetService, which can provide information about assets you might want to load using InsertService
Inheritance¶
Object → Instance → InsertService
Nova inheritance: Instance → InsertService
Properties¶
AllowInsertFreeModels Supported Property Deprecated Indicates whether ''Free Models'' can be inserted into the game.
Indicates whether ''Free Models'' can be inserted into the game.
The AllowInsertFreeModels property toggles whether ''Free Models'' can be inserted into the game, regardless of whether the place owner owns the asset.
Methods¶
ApproveAssetId Supported Function Deprecated Legacy approval call. Accepted for compatibility; does nothing.
Legacy approval call. Accepted for compatibility; does nothing.
The Nova implementation is an empty function. Scripts that call it will not error, but no approval occurs.
ApproveAssetVersionId Supported Function Deprecated Legacy approval call. Accepted for compatibility; does nothing.
Legacy approval call. Accepted for compatibility; does nothing.
The Nova implementation is an empty function. Scripts that call it will not error, but no approval occurs.
GetBaseCategories Supported Function Deprecated Deprecated. Use GetBaseSets() instead.
Deprecated. Use GetBaseSets() instead.
GetBaseSets Supported Function Deprecated Returns an array of dictionaries, containing information about various Roblox approved sets.
Returns an array of dictionaries, containing information about various Roblox approved sets.
GetCollection Supported Function Deprecated Returns the most recently uploaded models in the specified category.
Returns the most recently uploaded models in the specified category.
GetFreeDecals Supported Function Deprecated Retrieves a list of free Decals from the Catalog.
Retrieves a list of free Decals from the Catalog.
GetFreeModels Supported Function Deprecated Retrieves a list of Free Models from the Catalog.
Retrieves a list of Free Models from the Catalog.
GetLatestAssetVersionAsync Supported Function Returns the latest AssetVersionId of an asset for assets created by the place creator. Can be used in combination with InsertService.LoadAssetVersion…
Returns the latest AssetVersionId of an asset for assets created by the place creator. Can be used in combination with InsertService.LoadAssetVersion() to load the latest version of a model, even if it gets updated while the game is running.
GetUserCategories Supported Function Deprecated Deprecated. Use GetUserSets() instead.
Deprecated. Use GetUserSets() instead.
GetUserSets Supported Function Deprecated Returns an array of dictionaries, containing information about sets owned by the user.
Returns an array of dictionaries, containing information about sets owned by the user. This includes
- Sets the user is subscribed to.
- Sets that the user created.
- A single set containing the models created by the user.
- A single set containing the decals created by the user.
Note:
- All values in the dictionaries are strings, even if they are a number.
| Name | Description |
|---|---|
| Name | The name of the set. |
| Description | The description of the set. |
| ImageAssetId | An assetId for the icon of the set. |
| CreatorName | The creator of the set. |
| AssetSetId | The set's unique ID on the website. |
| CategoryId | Identical to AssetSetId |
| SetType | The type of set that this set is. |
Insert Supported Function Deprecated Inserts Instance into Workspace.
Inserts Instance into Workspace.
This function is a legacy method used to insert an Instance into Workspace.
LoadAsset Supported Function Returns a Model containing the asset.
The LoadAsset function fetches an asset given its ID and returns a Model containing the asset. For example, to load this public Doge Model, which has the asset ID 257489726, you can use:
local InsertService = game:GetService("InsertService")
local Workspace = game:GetService("Workspace")
local assetId = 257489726
local model = InsertService:LoadAsset(assetId)
model.Parent = Workspace
Calls to this function may fail if a server providing a model is having
problems. As such, it's generally a good idea to wrap calls to this
function in pcall to catch these kinds of errors.
local InsertService = game:GetService("InsertService")
local Workspace = game:GetService("Workspace")
local assetId = 257489726
local success, model = pcall(InsertService.LoadAsset, InsertService, assetId)
if success and model then
print("Model loaded successfully")
model.Parent = Workspace
else
print("Model failed to load!")
end
Security Check¶
An asset loaded by this function must meet one of the following:
- The asset must be created or owned by the game creator.
- The asset must be shared by the asset owner.
- The asset must be owned by Roblox.
Additionally, benign asset types such as t-shirts, shirts, pants and
avatar accessories are loadable from any game as they are OpenUse.
To load assets which do not meet the above criteria, such as free Models published on the Store, you must use AssetService.LoadAssetAsync() and enable AssetService.AllowInsertFreeAssets.
See also:
- AssetService.GetBundleDetailsAsync(), to find out which assets are associated with a bundle.
- For plugins, see DataModel.GetObjects()
loadAsset Supported Function Deprecated
No description available.
LoadAssetVersion Supported Function Returns a model inserted into InsertService containing the asset with the given assetVersionId.
Returns a model inserted into InsertService containing the asset with the given assetVersionId.
SetAdvancedResults Supported Function
No description available.
LocalUserSecuritySetAssetUrl Supported Function
No description available.
LocalUserSecuritySetAssetVersionUrl Supported Function
No description available.
LocalUserSecuritySetBaseCategoryUrl Supported Function
No description available.
LocalUserSecuritySetBaseSetsUrl Supported Function
No description available.
LocalUserSecuritySetCollectionUrl Supported Function
No description available.
LocalUserSecuritySetFreeDecalUrl Supported Function
No description available.
LocalUserSecuritySetFreeModelUrl Supported Function
No description available.
LocalUserSecuritySetTrustLevel Supported Function
No description available.
LocalUserSecuritySetUserCategoryUrl Supported Function
No description available.
LocalUserSecuritySetUserSetsUrl Supported Function
No description available.
LocalUserSecurityInherited members¶
Inherited from Instance: 8 properties, 36 methods, 7 events. They are documented on the base class page.
8 modern Roblox member(s) are not implemented yet — expand to inspect
Members declared by Roblox's InsertService class (or by a missing base class) that Nova does not expose. Use this list to scope a migration; the compatibility guide has the recommended workaround.
Methods¶
| Member | Signature | Status | Notes | Flags |
|---|---|---|---|---|
CreateMeshPartAsync |
InsertService:CreateMeshPartAsync(meshId: ContentId, collisionFidelity: CollisionFidelity, renderFidelity: RenderFidelity): MeshPart |
Not yet | Creates a new MeshPart with specified fidelity values. | Yields |
GetFreeDecalsAsync |
InsertService:GetFreeDecalsAsync(searchText: string, pageNum: int): Array |
Not yet | Retrieves a list of free Decals from the Catalog. | Yields |
GetFreeModelsAsync |
InsertService:GetFreeModelsAsync(searchText: string, pageNum: int): Array |
Not yet | Retrieves a list of Free Models from the Catalog. | Yields |
GetLocalFileContents |
InsertService:GetLocalFileContents(contentId: string): string |
Not yet | — | RobloxScriptSecurity |
LoadAssetWithBytecodeAsync |
InsertService:LoadAssetWithBytecodeAsync(content: Content): Instance |
Not yet | — | Yields, RobloxScriptSecurity |
LoadAssetWithFormat |
InsertService:LoadAssetWithFormat(assetId: int64, format: string): Instances |
Not yet | — | Yields, RobloxScriptSecurity |
LoadLocalAsset |
InsertService:LoadLocalAsset(assetPath: string): Instance |
Not yet | — | RobloxScriptSecurity |
LoadPackageAssetAsync |
InsertService:LoadPackageAssetAsync(url: ContentId): Instances |
Not yet | — | Yields, RobloxScriptSecurity |
Roblox reference: InsertService
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.