Skip to content
Roblox API Reference

AssetService

A non-replicated service that handles asset-related queries to the Roblox web API.
  • Not creatable
  • Service
Memory category
Instances
Own members
39
Inherited members
75
Subclasses
0
Siblings
608

Properties24

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Defined byAssetService1

Property categoryBehavior

Methods76

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byAssetService34
  • AssetService:CachePartOperationsAsync(partOperations: { any })
    • Yields
    • Roblox script security
    Parameters
    Parameter
    partOperations: { any }
  • AssetService:CanEditAssetAsync(content: Content): boolean
    • Yields
    • Roblox script security
    Parameters
    Parameter
    content: Content
    Returns
    Type
    boolean
  • AssetService:ComposeDecalAsync(decal: Decal, layers: { any })
    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.
    • Yields
    Parameters
    ParameterDescription
    decal: Decal
    A Decal instance that will be modified to contain a representation of the layers. Any existing maps on this instance will be cleared.
    layers: { any }
    An array of dictionary tables that maps PBR names to Content IDs.
  • AssetService:CreateAssetAsync(object: Object,assetType: Enum.AssetType,requestParameters: { [string]: any }? = nil,): ...any
    Uploads a new asset to Roblox from the given object.
    • Yields
    • Capabilities: AssetCreateUpdate
    Parameters
    ParameterDescription
    object: Object
    The object to be created as an asset.
    assetType: Enum.AssetType
    Currently 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.
    requestParameters: { [string]: any }? = nil
    Options 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
    ...any
    The CreateAssetResult and asset ID pair if successful.
  • AssetService:CreateAssetVersionAsync(object: Object,assetType: Enum.AssetType,assetId: number,requestParameters: { [string]: any }? = nil,): ...any
    Uploads a new version for an existing asset from the given object.
    • Yields
    • Capabilities: AssetCreateUpdate
    Parameters
    ParameterDescription
    object: Object
    The object to be created as an asset.
    assetType: Enum.AssetType
    Currently 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.
    assetId: number
    The ID of the asset for the new version.
    requestParameters: { [string]: any }? = nil
    Options 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
    ...any
    The CreateAssetResult and asset version number pair if successful.
  • AssetService:CreateDataModelContentAsync(content: Content,options: { [string]: any }?,): ...any
    Creates ephemeral, DataModel-scoped content from the provided content input.
    • Yields
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    content: Content
    Reference to the input content. Currently, this only supports Content wrapping a EditableMesh or EditableImage.
    options: { [string]: any }?
    Optional dictionary containing configuration controls for the created DataModel content. Currently no controls are surfaced and this parameter exists for future functionality.
    Returns
    TypeDescription
    ...any
    A tuple containing an CreateContentResult indicating the success or failure of the request, and the resulting DataModel-scoped OpaqueContent.
  • AssetService:CreateDecalAsync(content: { [string]: any }): Decal
    Creates a new Decal object using the provided EditableImage content maps.
    • Yields
    • Capabilities: Basic
    Parameters
    ParameterDescription
    content: { [string]: any }
    Dictionary 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
    Decal
    A new Decal instance with the given maps from the content parameter.
  • AssetService:CreateEditableImage(editableImageOptions: { [string]: any }?): EditableImage
    Creates a new EditableImage.
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    editableImageOptions: { [string]: any }?
    Options table containing controls for the method:
    • Size – A Vector2 that specifies the image's desired width and height.
    Returns
    TypeDescription
    EditableImage
    The new EditableImage, or nil if the device-specific editable memory budget is exhausted.
  • AssetService:CreateEditableImageAsync(content: Content,editableImageOptions: { [string]: any }?,): EditableImage
    Creates a new EditableImage object populated with the given image.
    • Yields
    • Capabilities: AssetRead
    Parameters
    ParameterDescription
    content: Content
    Reference to asset content stored externally or as an object within the place, wrapping a single value of one of the supported ContentSourceType values.
    editableImageOptions: { [string]: any }?
    Table containing options for the created EditableImage. Currently no options are available since resizing via Size is not supported.
    Returns
    TypeDescription
    EditableImage
    A new EditableImage containing the provided image.
  • AssetService:CreateEditableImageFromDownloadAsync(url: string): EditableImage
    • Yields
    • Roblox script security
    Parameters
    Parameter
    url: string
    Returns
    Type
    EditableImage
  • AssetService:CreateEditableMesh(editableMeshOptions: { [string]: any }?): EditableMesh
    Creates a new, empty EditableMesh.
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    editableMeshOptions: { [string]: any }?
    Table containing options for the created EditableMesh. Currently no options are available since FixedSize will always be false for empty editable meshes.
    Returns
    TypeDescription
    EditableMesh
    The new EditableMesh, or nil if the device-specific editable memory budget is exhausted.
  • AssetService:CreateEditableMeshAsync(content: Content,editableMeshOptions: { [string]: any }?,): EditableMesh
    Returns a new EditableMesh object created from an existing mesh content ID.
    • Yields
    • Capabilities: AssetRead
    Parameters
    ParameterDescription
    content: Content
    Reference to asset content stored externally or as an object within the place, wrapping a single value of one of the supported ContentSourceType values.
    editableMeshOptions: { [string]: any }?
    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
    EditableMesh
    The new EditableMesh object.
  • AssetService:CreateMeshPartAsync(meshContent: Content,options: { [string]: any }? = nil,): MeshPart
    Creates a new MeshPart with a specified mesh ID and an optional table of fidelity values.
    • Yields
    • Capabilities: Basic
    Parameters
    ParameterDescription
    meshContent: Content
    Reference to asset content stored externally or as an object within the place, wrapping a single value of one of the supported ContentSourceType values.
    options: { [string]: any }? = nil
    Options 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
    MeshPart
    The new MeshPart with the specified mesh and fidelity settings applied.
  • AssetService:CreatePlaceAsync(placeName: string,templatePlaceID: number,description: string? = "",): number
    Clones a place through the given templatePlaceID.
    • Yields
    • Capabilities: AssetCreateUpdate
    Parameters
    ParameterDescription
    placeName: string
    Name of the new place.
    templatePlaceID: number
    PlaceId of the place to clone.
    description: string? = ""
    Description of the new place.
    Returns
    TypeDescription
    number
    PlaceId of the new place.
  • AssetService:CreatePlaceInPlayerInventoryAsync(player: Instance,placeName: string,templatePlaceID: number,description: string? = "",): number
    Clones a place through the given templatePlaceID and puts it into the inventory of the given player.
    • Yields
    • Capabilities: AssetCreateUpdate
    Parameters
    ParameterDescription
    player: Instance
    The Player whose inventory receives the cloned place.
    placeName: string
    Name for the new place.
    templatePlaceID: number
    PlaceId of the place to clone.
    description: string? = ""
    Description for the new place.
    Returns
    TypeDescription
    number
    PlaceId of the new place.
  • AssetService:CreateSurfaceAppearanceAsync(content: { [string]: any }): SurfaceAppearance
    Creates a new SurfaceAppearance object using the provided content maps.
    • Yields
    • Capabilities: Basic
    Parameters
    ParameterDescription
    content: { [string]: any }
    Dictionary 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
    SurfaceAppearance
    A new SurfaceAppearance instance with the given maps from the content parameter.
  • AssetService:CreateTextContentAsync(text: string): Content
    • Yields
    • Roblox script security
    Parameters
    Parameter
    text: string
    Returns
    Type
    Content
  • AssetService:CreateTextureAsync(content: { [string]: any }): Texture
    • Yields
    • Capabilities: Basic
    Parameters
    Parameter
    content: { [string]: any }
    Returns
    Type
    Texture
  • AssetService:DeserializeInstance(serializedInstance: string): Instance
    • Roblox script security
    Parameters
    Parameter
    serializedInstance: string
    Returns
    Type
    Instance
  • AssetService:FetchAssetWithFormat(url: string,assetFormat: string,options: { [string]: any }?,): { Instance }
    • Yields
    • Roblox script security
    Parameters
    Parameter
    url: string
    assetFormat: string
    options: { [string]: any }?
    Returns
    Type
    { Instance }
  • AssetService:GetAssetIdsForPackageAsync(packageAssetId: number): { any }
    Returns an array of asset IDs that are contained in a specified package.
    • Yields
    • Capabilities: AssetRead
    Parameters
    ParameterDescription
    packageAssetId: number
    The asset ID of the package to query.
    Returns
    TypeDescription
    { any }
    Asset IDs that are contained in a specified package.
  • AssetService:GetAudioMetadataAsync(idList: { any }): { any }
    Provides relevant metadata about a specific audio source.
    • Yields
    • Capabilities: AssetRead
    Parameters
    ParameterDescription
    idList: { any }
    Array of asset or content IDs for which to retrieve metadata. Max batch size is 30.
    Returns
    TypeDescription
    { any }
    Array 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.
  • AssetService:GetBundleDetailsAsync(bundleId: number): { [string]: any }
    Returns details of the contents of specified bundle.
    • Yields
    • Capabilities: AssetRead
    Parameters
    ParameterDescription
    bundleId: number
    The ID of the specified bundle.
    Returns
    TypeDescription
    { [string]: any }
    Dictionary 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".
  • AssetService:GetGamePlacesAsync(): Instance
    Returns a StandardPages object which contains the name and PlaceId of places within the current experience.
    • Yields
    • Capabilities: AssetRead
    Returns
    TypeDescription
    Instance
    A StandardPages object whose pages contain the name and PlaceId of each place in the current experience.
  • AssetService:GetOpaqueContentMetadataMap(opaqueContent: Content): { [string]: any }
    • Roblox script security
    Parameters
    Parameter
    opaqueContent: Content
  • AssetService:LoadAssetAsync(assetId: number): Instance
    Loads a Model instance given its asset ID. This is the modern replacement for InsertService:LoadAsset() and supports loading third-party assets.
    • Yields
    • Capabilities: LoadUnownedAsset
    Parameters
    ParameterDescription
    assetId: number
    The asset ID number of the asset being loaded.
    Returns
    TypeDescription
    Instance
    A Model instance containing the loaded asset.
  • AssetService:PromptCreatePlatformContentAsync(player: Player,object: Object,assetType: Enum.AssetType,): ...any
    Allows in-experience asset creation for users by prompting a publish dialog.
    • Yields
    • Capabilities: AssetCreateUpdate
    Parameters
    ParameterDescription
    player: Player
    The user who submits an asset creation.
    object: Object
    The asset to be created. Currently can't contain scripts or nest non-public assets.
    assetType: Enum.AssetType
    The asset type. Currently can only be AssetType.Model.
    Returns
    TypeDescription
    ...any
    The PromptCreatePlatformContentResult and asset ID pair if successful.
  • AssetService:PromptImportAnimationClipFromVideoAsync(player: Player,progressCallback: (...any) -> ...any,): ...any
    Prompts the specified player to select and upload a video, which is then converted into an AnimationClip.
    • Yields
    • Capabilities: AssetManagement
    Parameters
    ParameterDescription
    player: Player
    The 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.
    progressCallback: (...any) -> ...any
    A function that receives status updates (an AnimationClipFromVideoStatus value) while the video is uploaded and processed.
    Returns
    TypeDescription
    ...any
    A tuple containing an AnimationClipFromVideoStatus describing the outcome and, on success, the resulting AnimationClip (nil otherwise).
  • AssetService:ReadTextContentAsync(content: Content): string
    • Yields
    • Roblox script security
    Parameters
    Parameter
    content: Content
    Returns
    Type
    string
  • AssetService:SavePlaceAsync(requestParameters: { [string]: any }?)
    Saves the state of the current place.
    • Yields
    • Capabilities: AssetCreateUpdate
    Parameters
    ParameterDescription
    requestParameters: { [string]: any }?
    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.
  • AssetService:SearchAudioAsync(searchParameters: AudioSearchParams): AudioPages
    Finds audio assets matching a variety of search criteria.
    • Yields
    • Capabilities: AssetRead
    Parameters
    ParameterDescription
    searchParameters: AudioSearchParams
    A AudioSearchParams object defining the search criteria such as keyword, title, artist, audio type, and duration range.
    Returns
    TypeDescription
    AudioPages
    An AudioPages object containing the paginated results of the audio search.
  • AssetService:GetAssetIdsForPackage(packageAssetId: number): { any }
    Deprecated: Use GetAssetIdsForPackageAsync() instead.
    Returns an array of asset IDs that are contained in a specified package.
    • Deprecated
    • Yields
    • Capabilities: AssetRead
    Parameters
    ParameterDescription
    packageAssetId: number
    The asset ID of the package to query.
    Returns
    TypeDescription
    { any }
    Asset IDs that are contained in a specified package.

    Use GetAssetIdsForPackageAsync instead.

  • AssetService:GetCreatorAssetID(creationID: number): number
    Deprecated: This item is deprecated and no longer functions correctly. Do not use it for new work.
    Returns the UserId of the account who created the creationID asset.
    • Deprecated
    • Yields
    • Capabilities: AssetRead
    Parameters
    ParameterDescription
    creationID: number
    The asset ID to look up for creator information.
    Returns
    TypeDescription
    number
    The Player.UserId of the account that created the asset.

    Use GetProductInfo instead.

  • AssetService:SearchAudio(searchParameters: AudioSearchParams): AudioPages
    Deprecated: Use SearchAudioAsync() instead.
    Finds audio assets matching a variety of search criteria.
    • Deprecated
    • Yields
    • Capabilities: AssetRead
    Parameters
    ParameterDescription
    searchParameters: AudioSearchParams
    A AudioSearchParams object defining the search criteria such as keyword, title, artist, audio type, and duration range.
    Returns
    TypeDescription
    AudioPages
    An AudioPages object containing the paginated results of the audio search.

    Use SearchAudioAsync instead.

Events14

Inherited fromObject1
Inherited fromInstance9
Defined byAssetService4