26 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

AssetService

Inherits from: Instance → Object

AssetService is a non-replicated service that handles asset-related queries to the Roblox web API.

Inherits from: Instance

Memory category: Instances

Tags: NotCreatable, Service

Properties

NameType / ReturnsDescription
AssetService.AllowInsertFreeAssetsbooleanControls whether AssetService:LoadAssetAsync() can load assets that are not owned by the experience creator.

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

AssetService.AllowInsertFreeAssets

This property can only be modified in Studio's Experience Settings by changing Allow Loading Third Party Assets.

When false (default), AssetService:LoadAssetAsync() can only load assets that meet one of the following:

When true, AssetService:LoadAssetAsync() can additionally load any public free asset on the Creator Store.

FieldValue
typeboolean
security{"read":"RobloxScriptSecurity","write":"RobloxScriptSecurity"}
thread safetyReadSafe
categoryBehavior
serialization{"can_load":true,"can_save":true}

Methods

NameType / ReturnsDescription
AssetService:ComposeDecalAsync()Modifies an existing Decal to contain a composite PBR textures created by layering the provided textures in the order they are provided in the layers array. Textures layer based on the alpha value of the color map.
AssetService:CreateAssetAsyncTupleUploads a new asset to Roblox from the given object.
AssetService:CreateAssetVersionAsyncTupleUploads a new version for an existing asset from the given object.
AssetService:CreateDataModelContentAsyncTupleCreates ephemeral, DataModel-scoped content from the provided content input.
AssetService:CreateDecalAsyncDecalCreates a new Decal object using the provided EditableImage content maps.
AssetService:CreateEditableImageEditableImageCreates a new EditableImage.
AssetService:CreateEditableImageAsyncEditableImageCreates a new EditableImage object populated with the given image.
AssetService:CreateEditableMeshEditableMeshCreates a new, empty EditableMesh.
AssetService:CreateEditableMeshAsyncEditableMeshReturns a new EditableMesh object created from an existing mesh content ID.
AssetService:CreateMeshPartAsyncMeshPartCreates a new MeshPart with a specified mesh ID and an optional table of fidelity values.
AssetService:CreatePlaceAsyncint64Clones a place through the given templatePlaceID.
AssetService:CreatePlaceInPlayerInventoryAsyncint64Clones a place through the given templatePlaceID and puts it into the inventory of the given player.
AssetService:CreateSurfaceAppearanceAsyncSurfaceAppearanceCreates a new SurfaceAppearance object using the provided content maps.
AssetService:GetAssetIdsForPackageArrayReturns an array of asset IDs that are contained in a specified package.
AssetService:GetAssetIdsForPackageAsyncArrayReturns an array of asset IDs that are contained in a specified package.
AssetService:GetAudioMetadataAsyncArrayProvides relevant metadata about a specific audio source.
AssetService:GetBundleDetailsAsyncDictionaryReturns details of the contents of specified bundle.
AssetService:GetCreatorAssetIDint64Returns the UserId of the account who created the creationID asset.
AssetService:GetGamePlacesAsyncInstanceReturns a StandardPages object which contains the name and PlaceId of places within the current experience.
AssetService:LoadAssetAsyncInstanceLoads a Model instance given its asset ID. This is the modern replacement for InsertService:LoadAsset() and supports loading third-party assets.
AssetService:PromptCreatePlatformContentAsyncTupleAllows in-experience asset creation for users by prompting a publish dialog.
AssetService:PromptImportAnimationClipFromVideoAsyncTuplePrompts the specified player to select and upload a video, which is then converted into an AnimationClip.
AssetService:SavePlaceAsync()Saves the state of the current place.
AssetService:SearchAudioAudioPagesFinds audio assets matching a variety of search criteria.
AssetService:SearchAudioAsyncAudioPagesFinds audio assets matching a variety of search criteria.

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

AssetService:ComposeDecalAsync

Modifies an existing Decal to contain a composed texture derived from one or more layered texture sets. Each set can include color, roughness, metalness, and normal maps. Each layer in layers is composited in the order they are provided, with the color map alpha channel used to determine blending.

Calling this method on a Decal that already has a pending ComposeDecalAsync call in progress raises an error; wait for the first call to resolve before issuing another on the same instance.

Parameters

NameTypeDefaultDescription
decalDecalA Decal instance that will be modified to contain a representation of the layers. Any existing maps on this instance will be cleared.
layersArrayAn array of dictionary tables that maps PBR names to Content IDs.

Returns

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

Code samples: View on Creator Hub (AssetService-ComposeDecalAsync).

AssetService:CreateAssetAsync

Uploads a new asset to Roblox from the given object.

Currently, this method can only be used in locally loaded plugins and uploads assets without prompting first.

Parameters

NameTypeDefaultDescription
objectObjectThe object to be created as an asset.
assetTypeAssetTypeCurrently supported types are: - AssetType.Model – with object as any valid Instance root. - AssetType.Plugin – with object as any valid Instance root. - AssetType.Mesh – with object as any valid EditableMesh root. - AssetType.Image – with object as any valid EditableImage root.
requestParametersDictionarynilOptions table containing asset metadata: - Name – Name of the asset as a string. Defaults to [object.Name]. - Description – Description of the asset as a string. Defaults to "Created with AssetService:CreateAssetAsync". - CreatorId – ID of the asset creator as a number. Defaults to the logged in Roblox Studio user for Plugin context. Required for Open Cloud Luau Execution context. - CreatorType – AssetCreatorType indicating the type of asset creator. Defaults to AssetCreatorType.User in Plugin context. Required for Open Cloud Luau Execution context. - IsPackage – Boolean value, only applicable to the AssetType.Model type. Defaults to true.

Returns

TypeDescription
TupleThe CreateAssetResult and asset ID pair if successful.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetCreateUpdate"]

Code samples: View on Creator Hub (AssetService-CreateAssetAsync).

AssetService:CreateAssetVersionAsync

Uploads a new version for an existing asset from the given object.

Currently, this method can only be used in locally loaded plugins and uploads assets without prompting first.

Parameters

NameTypeDefaultDescription
objectObjectThe object to be created as an asset.
assetTypeAssetTypeCurrently supported types are: - AssetType.Model – with object as any valid Instance root. - AssetType.Plugin – with object as any valid Instance root. - AssetType.Mesh – with object as any valid EditableMesh root. - AssetType.Image – with object as any valid EditableImage root.
assetIdint64The ID of the asset for the new version.
requestParametersDictionarynilOptions table containing asset metadata: - Name – A string. Name of the asset. Default: object.Name. - Description – A string. Description of the asset. Default: "Created with AssetService:CreateAssetAsync". - CreatorId – A number. ID of the asset creator. Default: The logged in Roblox Studio user for Plugin context. Required for Open Cloud Luau Execution context. - CreatorType – A AssetCreatorType. Type of asset creator. Default: AssetCreatorType.User in Plugin context. Required for Open Cloud Luau Execution context. - IsPackage – A bool. Only applicable to the AssetType.Model type. Default: true.

Returns

TypeDescription
TupleThe CreateAssetResult and asset version number pair if successful.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetCreateUpdate"]

Code samples: View on Creator Hub (AssetService-CreateAssetVersionAsync).

AssetService:CreateDataModelContentAsync

Creates ephemeral, DataModel-scoped content from the provided content input.

If the server storage budget is exhausted during this call, the creation will fail and the method will return CreateContentResult.StorageLimitExceeded alongside an empty Content object.

Parameters

NameTypeDefaultDescription
contentContentReference to the input content. Currently, this only supports Content wrapping a EditableMesh or EditableImage.
optionsDictionary?Optional dictionary containing configuration controls for the created DataModel content. Currently no controls are surfaced and this parameter exists for future functionality.

Returns

TypeDescription
TupleA tuple containing an CreateContentResult indicating the success or failure of the request, and the resulting DataModel-scoped Opaque Content.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["DynamicGeneration"]

AssetService:CreateDecalAsync

Creates a new Decal object using the provided color and physically based rendering (PBR) content maps. Each supported key sets the corresponding Decal content property. All maps are optional individually, but at least one must be provided; a color texture is not required.

Use Content.fromObject() to wrap a EditableImage for each map. Asset IDs, URI-based content, and Content.none are not accepted. To use an image asset, first load it with AssetService:CreateEditableImageAsync(), then wrap the returned EditableImage with Content.fromObject().

Omitted maps remain unset. All other Decal properties retain their default values, and the returned decal has no parent. Set its Face and parent it to a BasePart to display it on the desired face.

Unrecognized keys are ignored with a warning. The method raises an error if no supported maps are provided, or if any supported key has a value that is not Content containing a EditableImage.

Parameters

NameTypeDefaultDescription
contentDictionaryDictionary containing one or more of the following key-value pairs. Each value must be a Content object containing a EditableImage: - TextureContent — The decal's color texture. - NormalMapContent — The decal's normal map. - MetalnessMapContent — The decal's metalness map. - RoughnessMapContent — The decal's roughness map.

Returns

TypeDescription
DecalA new Decal instance with the given maps from the content parameter.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Basic"]

AssetService:CreateEditableImage

Creates a new EditableImage. By default, the resolution is set at 512×512, but you can specify a different size using the method's option table.

If the device‑specific editable memory budget is exhausted, creation fails and this method returns nil.

Parameters

NameTypeDefaultDescription
editableImageOptionsDictionary?Options table containing controls for the method: - Size – A Vector2 that specifies the image's desired width and height.

Returns

TypeDescription
EditableImageThe new EditableImage, or nil if the device-specific editable memory budget is exhausted.
FieldValue
securityNone
thread safetyUnsafe
capabilities["DynamicGeneration"]

AssetService:CreateEditableImageAsync

Creates a new EditableImage object populated with the given texture. Non-asset texture IDs such as rbxthumb:// are supported. If using an image asset, it must be associated with and/or owned by a creator of the experience, or it must have been created inside the experience. If the device-specific editable memory budget is exhausted, creation will fail and this method will return nil.

See the EditableImage documentation for special considerations when using this API.

Parameters

NameTypeDefaultDescription
contentContentReference to asset content stored externally or as an object within the place, wrapping a single value of one of the supported ContentSourceType values.
editableImageOptionsDictionary?Table containing options for the created EditableImage. Currently no options are available since resizing via Size is not supported.

Returns

TypeDescription
EditableImageA new EditableImage containing the provided image.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetRead"]

AssetService:CreateEditableMesh

Creates a new, empty EditableMesh. Vertices, triangles, and their attributes can be added dynamically to it. If the device‑specific editable memory budget is exhausted, creation will fail and this method will return nil.

Parameters

NameTypeDefaultDescription
editableMeshOptionsDictionary?Table containing options for the created EditableMesh. Currently no options are available since FixedSize will always be false for empty editable meshes.

Returns

TypeDescription
EditableMeshThe new EditableMesh, or nil if the device-specific editable memory budget is exhausted.
FieldValue
securityNone
thread safetyUnsafe
capabilities["DynamicGeneration"]

AssetService:CreateEditableMeshAsync

Returns a new EditableMesh object created from an existing EditableMesh or mesh Content ID. By default, an EditableMesh created from this method will be fixed size such that mesh data can only be modified, not added nor removed. A fixed size EditableMesh consumes less memory and should be preferred when possible.

If the device-specific editable memory budget is exhausted, creation will fail and this method will return nil.

See the Enabling for Published Experiences and Permissions sections of EditableMesh for special considerations when using this API.

Parameters

NameTypeDefaultDescription
contentContentReference to asset content stored externally or as an object within the place, wrapping a single value of one of the supported ContentSourceType values.
editableMeshOptionsDictionary?Options table containing controls for the method: - FixedSize – A bool. Default value is true, and the returned EditableMesh will not allow you to add or remove vertices, only modify their values. Set to false if the ability to change the mesh topology is required, at the expense of using more memory.

Returns

TypeDescription
EditableMeshThe new EditableMesh object.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetRead"]

AssetService:CreateMeshPartAsync

This method creates a MeshPart with a specified CollisionFidelity, RenderFidelity, and FluidFidelity. Because MeshPart.MeshId is read only, this method is for creating a mesh with any mesh ID through scripts, without having to clone an existing MeshPart. It throws errors if creation fails.

Parameters

NameTypeDefaultDescription
meshContentContentReference to asset content stored externally or as an object within the place, wrapping a single value of one of the supported ContentSourceType values.
optionsDictionarynilOptions table containing one or more controls for the method: - CollisionFidelity – The value of CollisionFidelity in the resulting part. Defaults to CollisionFidelity.Default if the option is absent or the options table is nil. - RenderFidelity – The value of RenderFidelity in the resulting part. Defaults to RenderFidelity.Automatic if the option is absent or the options table is nil. - FluidFidelity – The value of FluidFidelity in the resulting part. Defaults to FluidFidelity.Automatic if the option is absent or the options table is nil.

Returns

TypeDescription
MeshPartThe new MeshPart with the specified mesh and fidelity settings applied.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Basic"]

AssetService:CreatePlaceAsync

Clones a place through the given templatePlaceID and returns the PlaceId of the new place, which you can use with TeleportService. The clone place displays within the inventory of the place's creator with the given name and description.

Note that the template place must have template copying enabled through place settings. You cannot use this method to clone places that you don't own.

Frequent use of this API is not recommended, particularly if the created places contain scripts, as updating the code in a large volume of places quickly becomes infeasible. For user-generated worlds, consider serializing user creations and saving them in DataStores instead.

Parameters

NameTypeDefaultDescription
placeNamestringName of the new place.
templatePlaceIDint64PlaceId of the place to clone.
descriptionstringDescription of the new place.

Returns

TypeDescription
int64PlaceId of the new place.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetCreateUpdate"]

AssetService:CreatePlaceInPlayerInventoryAsync

Deprecated. This method has been removed and is no longer functional.

This method was removed in release 471 and no longer functions; calling it raises an error. It previously cloned the place identified by templatePlaceID and placed the copy into the given player's inventory. There is no direct replacement.

Parameters

NameTypeDefaultDescription
playerInstanceThe Player whose inventory receives the cloned place.
placeNamestringName for the new place.
templatePlaceIDint64PlaceId of the place to clone.
descriptionstringDescription for the new place.

Returns

TypeDescription
int64PlaceId of the new place.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetCreateUpdate"]

AssetService:CreateSurfaceAppearanceAsync

Creates a new SurfaceAppearance object using the provided content maps.

Currently, content only supports EditableImage and only content maps can be specified, but functionality will expand to include asset IDs as input. If you need to achieve this today, you can create an EditableImage from an asset ID using the following:

AssetService:CreateEditableImageAsync(Content.fromUri(uri))

Default values will be used for all other SurfaceAppearance properties. Note that the EditableImage assigned to each map cannot be reassigned or swapped after the SurfaceAppearance is created.

Parameters

NameTypeDefaultDescription
contentDictionaryDictionary containing the following key-value pairs: - ColorMap — A Content object that contains the color map. Default is nil. - MetalnessMap — A Content object that contains the metalness map. If more than one channel is present, only the red channel is used. Default is nil. - NormalMap — A Content object that contains the normal map. Default is nil. - RoughnessMap — A Content object that contains the roughness map. If more than one channel is present, only the red channel is used. Default is nil. - EmissiveMask — A Content object that contains the emissive mask. If more than one channel is present, only the red channel is used. Default is nil.

Returns

TypeDescription
SurfaceAppearanceA new SurfaceAppearance instance with the given maps from the content parameter.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Basic"]

Code samples: View on Creator Hub (AssetService-CreateSurfaceAppearanceAsync).

AssetService:GetAssetIdsForPackage

Deprecated. Use GetAssetIdsForPackageAsync() instead.

This deprecated method returns an array of asset IDs contained in the specified package. Use GetAssetIdsForPackageAsync() instead.

Parameters

NameTypeDefaultDescription
packageAssetIdint64The asset ID of the package to query.

Returns

TypeDescription
ArrayAsset IDs that are contained in a specified package.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["AssetRead"]

AssetService:GetAssetIdsForPackageAsync

Returns an array of asset IDs that are contained in a specified package.

Parameters

NameTypeDefaultDescription
packageAssetIdint64The asset ID of the package to query.

Returns

TypeDescription
ArrayAsset IDs that are contained in a specified package.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetRead"]

AssetService:GetAudioMetadataAsync

Provides relevant metadata about a specific audio source (artist, title, duration, type, etc.).

Parameters

NameTypeDefaultDescription
idListArrayArray of asset or content IDs for which to retrieve metadata. Max batch size is 30.

Returns

TypeDescription
ArrayArray of dictionary tables in the same order as the request, where each dictionary contains the following metadata for its asset/content: - AssetId (string) - Title (string) - Artist (string) - Duration (number) in seconds - AudioType (AudioSubType) Note that if an error occurs on fetching metadata for any of the requested assets, for example the asset ID doesn't exist, its dictionary table is still included in the returned array but it only contains the AssetId field for reference purposes. Additionally, if the AudioType cannot be determined for a given asset (perhaps because it's private audio), the resulting dictionary will not contain an AudioType entry.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetRead"]

Code samples: View on Creator Hub (AssetService-GetAudioMetadataAsync).

AssetService:GetBundleDetailsAsync

This function returns details of the contents of the specified bundle.

If the bundle ID does not exist, it throws HTTP 400 (Bad Request). If bundleId is not convertible to an integer, it throws Unable to cast string to int64.

Parameters

NameTypeDefaultDescription
bundleIdint64The ID of the specified bundle.

Returns

TypeDescription
DictionaryDictionary with the following key-value pairs containing details about the specified bundle: - Id — Bundle ID (same as passed bundleId argument) - Name — Bundle name - Description — Bundle description - BundleType — String representing the BundleType, for example "BodyParts" or "DynamicHead" - Items — Array of items in the bundle, each with details represented through the following keys: - Id — Item ID - Name — Item name - Type — Item type such as "Asset" - AssetType — String representing the AvatarAssetType - SupportsHeadShapes — Whether the asset supports head shape swapping. Only present if AssetType is "DynamicHead".
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetRead"]

Code samples: View on Creator Hub (getting-bundle-details).

AssetService:GetCreatorAssetID

Deprecated. This item is deprecated and no longer functions correctly. Do not use it for new work.

The GetCreatorAssetID function returns the Player.UserId of the account who created the creationID asset.

This member is broken and doesn't function correctly. Avoid using it.

Parameters

NameTypeDefaultDescription
creationIDint64The asset ID to look up for creator information.

Returns

TypeDescription
int64The Player.UserId of the account that created the asset.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["AssetRead"]

AssetService:GetGamePlacesAsync

Returns a StandardPages object which contains the name and PlaceId of places within the current experience.

Returns

TypeDescription
InstanceA StandardPages object whose pages contain the name and PlaceId of each place in the current experience.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetRead"]

Code samples: View on Creator Hub (AssetService-GetGamePlacesAsync1).

AssetService:LoadAssetAsync

Loads the latest version of an asset from the given assetId and returns it wrapped in a Model. This method is the modern replacement for InsertService:LoadAsset() and InsertService:LoadAssetVersion() methods.

Calls to this function may fail if the asset does not exist, or if the server providing the model is having problems. It is recommended to wrap calls to this function in pcall() to handle potential errors.

local AssetService = game:GetService("AssetService")

local assetId = 257489726

local success, model = pcall(AssetService.LoadAssetAsync, AssetService, assetId)
if success and model then
	print("Model loaded successfully")
	model.Parent = workspace
else
	warn("Model failed to load:", model) -- 'model' will contain the error message
end

Script Sandbox Security

For enhanced security, the returned Model is sandboxed by default (Sandboxed is true) and has no script Capabilities. This prevents untrusted scripts descending from the returned Model from running. To enable scripts in a model you trust, you can manually grant a safe set of Capabilities on the Model after loading.

Third-Party Asset Loading

Unlike InsertService:LoadAsset(), this method can load public assets created by third parties (assets not owned by the experience creator). To enable this functionality, toggle on Allow Loading Third Party Assets in Studio's Experience Settings.

If this setting is disabled (which it is by default), LoadAssetAsync will only load assets that are owned by the experience creator, behaving identically to the old InsertService:LoadAsset() security check.

Parameters

NameTypeDefaultDescription
assetIdint64The asset ID number of the asset being loaded.

Returns

TypeDescription
InstanceA Model instance containing the loaded asset.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["LoadUnownedAsset"]

AssetService:PromptCreatePlatformContentAsync

Allows in-experience asset creation for users by prompting a publish dialog. When called, it presents a dialog to the user, allowing them to enter a name, description, and preview the asset. Upon submitting, it saves the asset to the user's inventory. Can only be invoked on the server side.

Parameters

NameTypeDefaultDescription
playerPlayerThe user who submits an asset creation.
objectObjectThe asset to be created. Currently can't contain scripts or nest non-public assets.
assetTypeAssetTypeThe asset type. Currently can only be AssetType.Model.

Returns

TypeDescription
TupleThe Enum.PromptCreatePlatformContentResult and asset ID pair if successful.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetCreateUpdate"]

AssetService:PromptImportAnimationClipFromVideoAsync

Prompts the given player to select and upload a video on their own client, then converts the uploaded video into an AnimationClip and returns it. The player must grant consent through the prompt before the upload proceeds; if they decline or provide no input, the method resolves with AnimationClipFromVideoStatus.Cancelled and no clip.

This method can only be called from the server. The returned AnimationClipFromVideoStatus reports success or the reason processing failed.

Parameters

NameTypeDefaultDescription
playerPlayerThe player who is prompted, on their own client, to select and upload a video. The player's consent is required before the video is uploaded.
progressCallbackFunctionA function that receives status updates (an AnimationClipFromVideoStatus value) while the video is uploaded and processed.

Returns

TypeDescription
TupleA tuple containing an AnimationClipFromVideoStatus describing the outcome and, on success, the resulting AnimationClip (nil otherwise).
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetManagement"]

AssetService:SavePlaceAsync

Saves the current state of the place. Keep in mind the following guidelines and restrictions:

Parameters

NameTypeDefaultDescription
requestParametersDictionary?Optional dictionary that includes SaveWithoutPublish, a boolean indicating whether to save with publish or without publish, and PlaceId, the destination place ID to save over. An example usage would be: AssetService:SavePlaceAsync({PlaceId = 1, SaveWithoutPublish = true}). If PlaceId is not provided, the default behavior will save over the current original place which is calling SavePlaceAsync. If SaveWithoutPublish is not provided, the default behavior is SaveWithoutPublish=false.

Returns

TypeDescription
()
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetCreateUpdate"]

AssetService:SearchAudio

Deprecated. Use SearchAudioAsync() instead.

This deprecated method finds audio assets matching a variety of search criteria. Use SearchAudioAsync() instead.

Parameters

NameTypeDefaultDescription
searchParametersAudioSearchParamsA AudioSearchParams object defining the search criteria such as keyword, title, artist, audio type, and duration range.

Returns

TypeDescription
AudioPagesAn AudioPages object containing the paginated results of the audio search.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["AssetRead"]

Code samples: View on Creator Hub (printing-search-audio-result-titles).

AssetService:SearchAudioAsync

Returns a AudioPages object containing the result of the given search. Will not return fields with empty values.

Note that this method has a low HTTP request limit and can throw an error, so it should always be wrapped in pcall() for error handling. Possible error messages include:

Error Message Reason
HTTP 429 (Too Many Requests) Class.AssetService:SearchAudio() has been called too many times.
Unexpected type for data, expected array got null The keyword argument was filtered.

Parameters

NameTypeDefaultDescription
searchParametersAudioSearchParamsA AudioSearchParams object defining the search criteria such as keyword, title, artist, audio type, and duration range.

Returns

TypeDescription
AudioPagesAn AudioPages object containing the paginated results of the audio search.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["AssetRead"]

Code samples: View on Creator Hub (printing-search-audio-result-titles).

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.