Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
InsertService
Inherits from: Instance → Object
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
Inherits from: Instance
Memory category: Instances
Tags: NotCreatable, Service
Properties
| Name | Type / Returns | Description |
|---|---|---|
| InsertService.AllowInsertFreeModels | boolean | Indicates whether ''Free Models'' can be inserted into the game. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.Archivable | boolean | Determines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published. |
| Instance.archivable | boolean | |
| Instance.Capabilities | SecurityCapabilities | The set of capabilities allowed to be used for scripts inside this container. |
| Instance.IsInSandbox | boolean | Indicates whether the instance is inside a sandboxed container. |
| Instance.Name | string | A non-unique identifier of the Instance. |
| Instance.Parent | Instance | Determines the hierarchical parent of the Instance. |
| Instance.PredictionMode | PredictionMode | Reflects the client-side prediction mode applied to the instance under server-authoritative physics. |
| Instance.RobloxLocked | boolean | A deprecated property that used to protect CoreGui objects. |
| Instance.Sandboxed | boolean | When enabled, the instance can only access abilities in its Capabilities list. |
| Instance.UniqueId | UniqueId | A unique identifier for the instance. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.ClassName | string | A read-only string representing the class this Object belongs to. |
| Object.className | string |
InsertService.AllowInsertFreeModels
Deprecated. This item was never released. Do not use it in new work.
The AllowInsertFreeModels property toggles whether ''Free Models'' can be inserted into the game, regardless of whether the place owner owns the asset.
| Field | Value |
|---|---|
| type | boolean |
| tags | ["NotReplicated","NotBrowsable","Deprecated"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["LoadUnownedAsset"] |
Methods
| Name | Type / Returns | Description |
|---|---|---|
| InsertService:ApproveAssetId | () | Deprecated. Accepts an asset ID for InsertService approval; calling it has no effect. |
| InsertService:ApproveAssetVersionId | () | Deprecated. Accepts an asset version ID for InsertService approval; calling it has no effect. |
| InsertService:CreateMeshPartAsync | MeshPart | Creates a new MeshPart with specified fidelity values. |
| InsertService:GetBaseCategories | Array | |
| InsertService:GetBaseSets | Array | Returns an array of dictionaries, containing information about various Roblox approved sets. |
| InsertService:GetCollection | Array | Returns the most recently uploaded models in the specified category. |
| InsertService:GetFreeDecals | Array | Retrieves a list of free Decals from the Catalog. |
| InsertService:GetFreeDecalsAsync | Array | Retrieves a list of free Decals from the Catalog. |
| InsertService:GetFreeModels | Array | Retrieves a list of Free Models from the Catalog. |
| InsertService:GetFreeModelsAsync | Array | Retrieves a list of Free Models from the Catalog. |
| InsertService:GetLatestAssetVersionAsync | int64 | 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. |
| InsertService:GetUserCategories | Array | |
| InsertService:GetUserSets | Array | Returns an array of dictionaries, containing information about sets owned by the user. |
| InsertService:Insert | () | Inserts Instance into Workspace. |
| InsertService:LoadAsset | Instance | Returns a Model containing the asset. |
| InsertService:loadAsset | Instance | |
| InsertService:LoadAssetVersion | Instance | Returns a model inserted into InsertService containing the asset with the given assetVersionId. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance:AddTag | () | Applies a tag to the instance. |
| Instance:children | Instances | Returns an array of the object's children. |
| Instance:ClearAllChildren | () | This method destroys all of an instance's children. |
| Instance:Clone | Instance | Create a copy of an instance and all its descendants, ignoring instances that are not Archivable. |
| Instance:clone | Instance | |
| Instance:Destroy | () | Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children. |
| Instance:destroy | () | |
| Instance:FindFirstAncestor | Instance? | Returns the first ancestor of the Instance whose Instance.Name is equal to the given name. |
| Instance:FindFirstAncestorOfClass | Instance? | Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className. |
| Instance:FindFirstAncestorWhichIsA | Instance? | Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstChild | Instance? | Returns the first child of the Instance found with the given name. |
| Instance:findFirstChild | Instance | |
| Instance:FindFirstChildOfClass | Instance? | Returns the first child of the Instance whose ClassName is equal to the given class name. |
| Instance:FindFirstChildWhichIsA | Instance? | Returns the first child of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstDescendant | Instance? | Returns the first descendant found with the given Instance.Name. |
| Instance:GetActor | Actor? | Returns the Actor associated with the Instance, if any. |
| Instance:GetAttribute | Variant | Returns the value which has been assigned to the given attribute name. |
| Instance:GetAttributeChangedSignal | RBXScriptSignal | Returns an event that fires when the given attribute changes. |
| Instance:GetAttributes | Dictionary | Returns a dictionary of the instance's attributes. |
| Instance:GetChildren | Instances | Returns an array containing all of the instance's children. |
| Instance:getChildren | Instances | |
| Instance:GetDebugId | string | Returns a coded string of the debug ID used internally by Roblox. |
| Instance:GetDescendants | Instances | Returns an array containing all of the descendants of the instance. |
| Instance:GetFullName | string | Returns a string describing the instance's ancestry. |
| Instance:GetStyled | Variant | Returns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified. |
| Instance:GetStyledPropertyChangedSignal | RBXScriptSignal | Returns an event that fires when the given style property changes on the instance. |
| Instance:GetTags | Array | Gets an array of all tags applied to the instance. |
| Instance:HasTag | boolean | Check whether the instance has a given tag. |
| Instance:IsAncestorOf | boolean | Returns true if an Instance is an ancestor of the given descendant. |
| Instance:IsDescendantOf | boolean | Returns true if an Instance is a descendant of the given ancestor. |
| Instance:isDescendantOf | boolean | |
| Instance:IsPropertyModified | boolean | Returns true if the value stored in the specified property is not equal to the code-instantiated default. |
| Instance:QueryDescendants | Instances | Returns an array containing all descendants of the instance that match the selector string. |
| Instance:Remove | () | Sets the object's Parent to nil, and does the same for all its descendants. |
| Instance:remove | () | |
| Instance:RemoveTag | () | Removes a tag from the instance. |
| Instance:ResetPropertyToDefault | () | Resets a property to its default value. |
| Instance:SetAttribute | () | Sets the attribute with the given name to the given value. |
| Instance:WaitForChild | Instance | Returns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object:GetPropertyChangedSignal | RBXScriptSignal | Get an event that fires when a given property of the object changes. |
| Object:IsA | boolean | Returns true if an object's class matches or inherits from a given class. |
| Object:isA | boolean |
InsertService:ApproveAssetId
Deprecated. This item is deprecated. Do not use it for new work.
Deprecated. Accepts an asset ID that was once used to approve assets for InsertService. Calling it has no effect. Retained only for backward compatibility; do not use it in new work.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| assetId | int64 | The ID of the asset. |
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| tags | ["Deprecated"] |
| security | None |
| thread safety | Unsafe |
InsertService:ApproveAssetVersionId
Deprecated. This item is deprecated. Do not use it for new work.
Deprecated. Accepts an asset version ID that was once used to approve assets for InsertService. Calling it has no effect. Retained only for backward compatibility; do not use it in new work.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| assetVersionId | int64 | The version ID of the asset. |
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| tags | ["Deprecated"] |
| security | None |
| thread safety | Unsafe |
InsertService:CreateMeshPartAsync
Creates a new MeshPart with specified CollisionFidelity and RenderFidelity. Because MeshPart.MeshId is read only, this is the way to create a MeshPart through scripts without having to clone an existing one. It throws errors if creation fails.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| meshId | ContentId | Mesh asset ID. | |
| collisionFidelity | CollisionFidelity | Set MeshPart.CollisionFidelity. | |
| renderFidelity | RenderFidelity | Set MeshPart.RenderFidelity. |
Returns
| Type | Description |
|---|---|
| MeshPart | New MeshPart instance. |
| Field | Value |
|---|---|
| tags | ["Yields"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["Basic"] |
InsertService:GetBaseCategories
Deprecated. This item is deprecated. Do not use it for new work.
Returns
| Type | Description |
|---|---|
| Array |
| Field | Value |
|---|---|
| tags | ["Yields","Deprecated"] |
| security | None |
| thread safety | Unsafe |
InsertService:GetBaseSets
Deprecated. Sets have been removed from Roblox.
Returns an array of dictionaries, containing information about various Roblox approved sets.
Returns
| Type | Description |
|---|---|
| Array | An array of dictionaries containing information about Roblox-approved sets. |
| Field | Value |
|---|---|
| tags | ["Yields","Deprecated"] |
| security | None |
| thread safety | Unsafe |
InsertService:GetCollection
Deprecated. Sets have been removed from Roblox.
Returns the most recently uploaded models in the specified category.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| categoryId | int64 | The ID of the set (category) to retrieve models from. |
Returns
| Type | Description |
|---|---|
| Array | An array of the most recently uploaded models in the specified set. |
| Field | Value |
|---|---|
| tags | ["Yields","Deprecated"] |
| security | None |
| thread safety | Unsafe |
Code samples: View on Creator Hub (InsertService-GetCollection1).
InsertService:GetFreeDecals
Deprecated. Use GetFreeDecalsAsync() instead.
Retrieves a list of free Decals from the Catalog.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| searchText | string | String used to search for free decals in the Catalog. | |
| pageNum | int | The page number in the Catalog to return. |
Returns
| Type | Description |
|---|---|
| Array | A single table (of returned free decals) wrapped in a table. |
| Field | Value |
|---|---|
| tags | ["Yields","Deprecated"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["AssetRead"] |
Code samples: View on Creator Hub (InsertService-GetFreeDecals1).
InsertService:GetFreeDecalsAsync
The GetFreeDecalsAsync function retrieves a list of free Decals from the Catalog. The return type for this method is very odd, as it returns a single table wrapped in a table.
The best way to explain it is to show a visual of the array returned:
[1] = {
CurrentStartIndex = 1, -- This can vary depending on the page you input.
TotalCount = 21, -- Always 21.
Results = {
-- All parameters here are pseudo. They can vary depending on the asset.
[1] = {
Name = "Asset Name",
AssetId = 0000000,
AssetVersionId = 0000000,
CreatorName = "Roblox",
},
-- [2], [3], and so on... up to [21]
},
} An example for iterating over this list has been provided at the bottom of this page.
Additionally, if you want to insert Models instead, you can use the InsertService:GetFreeModelsAsync() function.
Note: The page argument starts at 0. So Page 1 = 0, Page 2 = 1, etc.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| searchText | string | String used to search for free decals in the Catalog. | |
| pageNum | int | The page number in the Catalog to return. |
Returns
| Type | Description |
|---|---|
| Array | A single table (of returned free decals) wrapped in a table. |
| Field | Value |
|---|---|
| tags | ["Yields"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["AssetRead"] |
Code samples: View on Creator Hub (InsertService-GetFreeDecals1).
InsertService:GetFreeModels
Deprecated. Use GetFreeModelsAsync() instead.
Retrieves a list of Free Models from the Catalog.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| searchText | string | String used to search for free models in the Catalog. | |
| pageNum | int | The page number in the Catalog to return. |
Returns
| Type | Description |
|---|---|
| Array | A single table (of returned free models) wrapped in a table. |
| Field | Value |
|---|---|
| tags | ["Yields","Deprecated"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["AssetRead"] |
Code samples: View on Creator Hub (InsertService-GetFreeModels1).
InsertService:GetFreeModelsAsync
The GetFreeModelsAsync function retrieves a list of Free Models from the Catalog. The return type for this method is very odd, as it returns a single table wrapped in a table.
The best way to explain it is to show a visual of the array returned:
[1] = {
CurrentStartIndex = 1, -- This can vary depending on the page you input.
TotalCount = 21, -- Always 21.
Results = {
-- All parameters here are pseudo. They can vary depending on the asset.
[1] = {
Name = "Asset Name",
AssetId = 0000000,
AssetVersionId = 0000000,
CreatorName = "Roblox",
}
-- [2], [3], and so on... up to [21]
}
} An example for iterating over this list has been provided at the bottom of this page.
Additionally, if you would like to insert free Decals, you can use the InsertService:GetFreeDecalsAsync() function.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| searchText | string | String used to search for free decals in the Catalog. | |
| pageNum | int | The page number in the Catalog to return. |
Returns
| Type | Description |
|---|---|
| Array | A single table (of returned free models) wrapped in a table. |
| Field | Value |
|---|---|
| tags | ["Yields"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["AssetRead"] |
Code samples: View on Creator Hub (InsertService-GetFreeModels1).
InsertService:GetLatestAssetVersionAsync
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.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| assetId | int64 | The ID of the asset to retrieve the latest version for. |
Returns
| Type | Description |
|---|---|
| int64 | The latest asset version ID for the specified asset. |
| Field | Value |
|---|---|
| tags | ["Yields"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["AssetRead"] |
InsertService:GetUserCategories
Deprecated. This item is deprecated. Do not use it for new work.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| userId | User |
Returns
| Type | Description |
|---|---|
| Array |
| Field | Value |
|---|---|
| tags | ["Yields","Deprecated"] |
| security | None |
| thread safety | Unsafe |
InsertService:GetUserSets
Deprecated. Sets have been removed from Roblox.
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. |
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| userId | User | The ID of the user whose sets to retrieve. |
Returns
| Type | Description |
|---|---|
| Array | An array of dictionaries containing information about the user's sets. |
| Field | Value |
|---|---|
| tags | ["Yields","Deprecated"] |
| security | None |
| thread safety | Unsafe |
InsertService:Insert
Deprecated. This function has been superseded by InsertService:LoadAsset() which should be used in all new work.
This function is a legacy method used to insert an Instance into Workspace.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| instance | Instance | The Instance to insert into Workspace. |
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| tags | ["Deprecated"] |
| security | None |
| thread safety | Unsafe |
Code samples: View on Creator Hub (InsertService-Insert1).
InsertService:LoadAsset
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()
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| assetId | int64 | The asset ID of the asset being loaded. |
Returns
| Type | Description |
|---|---|
| Instance | An instance of the loaded asset. |
| Field | Value |
|---|---|
| tags | ["Yields"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["LoadOwnedAsset"] |
Code samples: View on Creator Hub (InsertService-LoadAsset1).
InsertService:loadAsset
Deprecated. This function is a deprecated variant of InsertService:LoadAsset() which should be used instead.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| assetId | int64 |
Returns
| Type | Description |
|---|---|
| Instance |
| Field | Value |
|---|---|
| tags | ["Yields","Deprecated"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["LoadOwnedAsset"] |
InsertService:LoadAssetVersion
Returns a model inserted into InsertService containing the asset with the given assetVersionId.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| assetVersionId | int64 | The version ID of the asset to load. |
Returns
| Type | Description |
|---|---|
| Instance | A Model containing the asset at the specified version. |
| Field | Value |
|---|---|
| tags | ["Yields"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["LoadOwnedAsset"] |
Code samples: View on Creator Hub (InsertService-LoadAssetVersion1).
Events
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.AncestryChanged | Fires when the Instance.Parent property of this object or one of its ancestors is changed. | |
| Instance.AttributeChanged | Fires whenever an attribute is changed on the Instance. | |
| Instance.ChildAdded | Fires after an object is parented to this Instance. | |
| Instance.childAdded | ||
| Instance.ChildRemoved | Fires after a child is removed from this Instance. | |
| Instance.DescendantAdded | Fires after a descendant is added to the Instance. | |
| Instance.DescendantRemoving | Fires immediately before a descendant of the Instance is removed. | |
| Instance.Destroying | Fires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy(). | |
| Instance.StyledPropertiesChanged | Fires whenever any style property is changed on the instance, including when a property is set to nil. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.Changed | Fires immediately after a property of the object changes, with some limitations. |