15 min read

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

Inherits from: Instance

Memory category: Instances

Tags: NotCreatable, Service

Properties

NameType / ReturnsDescription
InsertService.AllowInsertFreeModelsbooleanIndicates whether ''Free Models'' can be inserted into the game.

Inherited from Instance

NameType / ReturnsDescription
Instance.ArchivablebooleanDetermines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published.
Instance.archivableboolean
Instance.CapabilitiesSecurityCapabilitiesThe set of capabilities allowed to be used for scripts inside this container.
Instance.IsInSandboxbooleanIndicates whether the instance is inside a sandboxed container.
Instance.NamestringA non-unique identifier of the Instance.
Instance.ParentInstanceDetermines the hierarchical parent of the Instance.
Instance.PredictionModePredictionModeReflects the client-side prediction mode applied to the instance under server-authoritative physics.
Instance.RobloxLockedbooleanA deprecated property that used to protect CoreGui objects.
Instance.SandboxedbooleanWhen enabled, the instance can only access abilities in its Capabilities list.
Instance.UniqueIdUniqueIdA unique identifier for the instance.

Inherited from Object

NameType / ReturnsDescription
Object.ClassNamestringA read-only string representing the class this Object belongs to.
Object.classNamestring

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.

FieldValue
typeboolean
tags["NotReplicated","NotBrowsable","Deprecated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryBehavior
serialization{"can_load":true,"can_save":true}
capabilities["LoadUnownedAsset"]

Methods

NameType / ReturnsDescription
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:CreateMeshPartAsyncMeshPartCreates a new MeshPart with specified fidelity values.
InsertService:GetBaseCategoriesArray
InsertService:GetBaseSetsArrayReturns an array of dictionaries, containing information about various Roblox approved sets.
InsertService:GetCollectionArrayReturns the most recently uploaded models in the specified category.
InsertService:GetFreeDecalsArrayRetrieves a list of free Decals from the Catalog.
InsertService:GetFreeDecalsAsyncArrayRetrieves a list of free Decals from the Catalog.
InsertService:GetFreeModelsArrayRetrieves a list of Free Models from the Catalog.
InsertService:GetFreeModelsAsyncArrayRetrieves a list of Free Models from the Catalog.
InsertService:GetLatestAssetVersionAsyncint64Returns 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:GetUserCategoriesArray
InsertService:GetUserSetsArrayReturns an array of dictionaries, containing information about sets owned by the user.
InsertService:Insert()Inserts Instance into Workspace.
InsertService:LoadAssetInstanceReturns a Model containing the asset.
InsertService:loadAssetInstance
InsertService:LoadAssetVersionInstanceReturns a model inserted into InsertService containing the asset with the given assetVersionId.

Inherited from Instance

NameType / ReturnsDescription
Instance:AddTag()Applies a tag to the instance.
Instance:childrenInstancesReturns an array of the object's children.
Instance:ClearAllChildren()This method destroys all of an instance's children.
Instance:CloneInstanceCreate a copy of an instance and all its descendants, ignoring instances that are not Archivable.
Instance:cloneInstance
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:FindFirstAncestorInstance?Returns the first ancestor of the Instance whose Instance.Name is equal to the given name.
Instance:FindFirstAncestorOfClassInstance?Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className.
Instance:FindFirstAncestorWhichIsAInstance?Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstChildInstance?Returns the first child of the Instance found with the given name.
Instance:findFirstChildInstance
Instance:FindFirstChildOfClassInstance?Returns the first child of the Instance whose ClassName is equal to the given class name.
Instance:FindFirstChildWhichIsAInstance?Returns the first child of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstDescendantInstance?Returns the first descendant found with the given Instance.Name.
Instance:GetActorActor?Returns the Actor associated with the Instance, if any.
Instance:GetAttributeVariantReturns the value which has been assigned to the given attribute name.
Instance:GetAttributeChangedSignalRBXScriptSignalReturns an event that fires when the given attribute changes.
Instance:GetAttributesDictionaryReturns a dictionary of the instance's attributes.
Instance:GetChildrenInstancesReturns an array containing all of the instance's children.
Instance:getChildrenInstances
Instance:GetDebugIdstringReturns a coded string of the debug ID used internally by Roblox.
Instance:GetDescendantsInstancesReturns an array containing all of the descendants of the instance.
Instance:GetFullNamestringReturns a string describing the instance's ancestry.
Instance:GetStyledVariantReturns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified.
Instance:GetStyledPropertyChangedSignalRBXScriptSignalReturns an event that fires when the given style property changes on the instance.
Instance:GetTagsArrayGets an array of all tags applied to the instance.
Instance:HasTagbooleanCheck whether the instance has a given tag.
Instance:IsAncestorOfbooleanReturns true if an Instance is an ancestor of the given descendant.
Instance:IsDescendantOfbooleanReturns true if an Instance is a descendant of the given ancestor.
Instance:isDescendantOfboolean
Instance:IsPropertyModifiedbooleanReturns true if the value stored in the specified property is not equal to the code-instantiated default.
Instance:QueryDescendantsInstancesReturns 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:WaitForChildInstanceReturns 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

NameType / ReturnsDescription
Object:GetPropertyChangedSignalRBXScriptSignalGet an event that fires when a given property of the object changes.
Object:IsAbooleanReturns true if an object's class matches or inherits from a given class.
Object:isAboolean

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

NameTypeDefaultDescription
assetIdint64The ID of the asset.

Returns

TypeDescription
()
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe

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

NameTypeDefaultDescription
assetVersionIdint64The version ID of the asset.

Returns

TypeDescription
()
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe

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

NameTypeDefaultDescription
meshIdContentIdMesh asset ID.
collisionFidelityCollisionFidelitySet MeshPart.CollisionFidelity.
renderFidelityRenderFidelitySet MeshPart.RenderFidelity.

Returns

TypeDescription
MeshPartNew MeshPart instance.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Basic"]

InsertService:GetBaseCategories

Deprecated. This item is deprecated. Do not use it for new work.

Returns

TypeDescription
Array
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe

InsertService:GetBaseSets

Deprecated. Sets have been removed from Roblox.

Returns an array of dictionaries, containing information about various Roblox approved sets.

Returns

TypeDescription
ArrayAn array of dictionaries containing information about Roblox-approved sets.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe

InsertService:GetCollection

Deprecated. Sets have been removed from Roblox.

Returns the most recently uploaded models in the specified category.

Parameters

NameTypeDefaultDescription
categoryIdint64The ID of the set (category) to retrieve models from.

Returns

TypeDescription
ArrayAn array of the most recently uploaded models in the specified set.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe

Code samples: View on Creator Hub (InsertService-GetCollection1).

InsertService:GetFreeDecals

Deprecated. Use GetFreeDecalsAsync() instead.

Retrieves a list of free Decals from the Catalog.

Parameters

NameTypeDefaultDescription
searchTextstringString used to search for free decals in the Catalog.
pageNumintThe page number in the Catalog to return.

Returns

TypeDescription
ArrayA single table (of returned free decals) wrapped in a table.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
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

NameTypeDefaultDescription
searchTextstringString used to search for free decals in the Catalog.
pageNumintThe page number in the Catalog to return.

Returns

TypeDescription
ArrayA single table (of returned free decals) wrapped in a table.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
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

NameTypeDefaultDescription
searchTextstringString used to search for free models in the Catalog.
pageNumintThe page number in the Catalog to return.

Returns

TypeDescription
ArrayA single table (of returned free models) wrapped in a table.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
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

NameTypeDefaultDescription
searchTextstringString used to search for free decals in the Catalog.
pageNumintThe page number in the Catalog to return.

Returns

TypeDescription
ArrayA single table (of returned free models) wrapped in a table.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
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

NameTypeDefaultDescription
assetIdint64The ID of the asset to retrieve the latest version for.

Returns

TypeDescription
int64The latest asset version ID for the specified asset.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetRead"]

InsertService:GetUserCategories

Deprecated. This item is deprecated. Do not use it for new work.

Parameters

NameTypeDefaultDescription
userIdUser

Returns

TypeDescription
Array
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe

InsertService:GetUserSets

Deprecated. Sets have been removed from Roblox.

Returns an array of dictionaries, containing information about sets owned by the user. This includes

Note:

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

NameTypeDefaultDescription
userIdUserThe ID of the user whose sets to retrieve.

Returns

TypeDescription
ArrayAn array of dictionaries containing information about the user's sets.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe

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

NameTypeDefaultDescription
instanceInstanceThe Instance to insert into Workspace.

Returns

TypeDescription
()
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe

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:

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:

Parameters

NameTypeDefaultDescription
assetIdint64The asset ID of the asset being loaded.

Returns

TypeDescription
InstanceAn instance of the loaded asset.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
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

NameTypeDefaultDescription
assetIdint64

Returns

TypeDescription
Instance
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["LoadOwnedAsset"]

InsertService:LoadAssetVersion

Returns a model inserted into InsertService containing the asset with the given assetVersionId.

Parameters

NameTypeDefaultDescription
assetVersionIdint64The version ID of the asset to load.

Returns

TypeDescription
InstanceA Model containing the asset at the specified version.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["LoadOwnedAsset"]

Code samples: View on Creator Hub (InsertService-LoadAssetVersion1).

Events

Inherited from Instance

NameType / ReturnsDescription
Instance.AncestryChangedFires when the Instance.Parent property of this object or one of its ancestors is changed.
Instance.AttributeChangedFires whenever an attribute is changed on the Instance.
Instance.ChildAddedFires after an object is parented to this Instance.
Instance.childAdded
Instance.ChildRemovedFires after a child is removed from this Instance.
Instance.DescendantAddedFires after a descendant is added to the Instance.
Instance.DescendantRemovingFires immediately before a descendant of the Instance is removed.
Instance.DestroyingFires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy().
Instance.StyledPropertiesChangedFires whenever any style property is changed on the instance, including when a property is set to nil.

Inherited from Object

NameType / ReturnsDescription
Object.ChangedFires immediately after a property of the object changes, with some limitations.