Learn
Engine Class
AssetService
Not Creatable
Service

Summary
Methods
ComposeDecalAsync(decal: Decal,layers: {any}):()
CreateAssetAsync(object: Object,assetType: Enum.AssetType,requestParameters: Dictionary):Tuple
CreateAssetVersionAsync(object: Object,assetType: Enum.AssetType,assetId: number,requestParameters: Dictionary):Tuple
CreateEditableImageAsync(content: Content,editableImageOptions: Dictionary?):EditableImage
CreateEditableMeshAsync(content: Content,editableMeshOptions: Dictionary?):EditableMesh
CreatePlaceAsync(placeName: string,templatePlaceID: number,description: string):number
CreatePlaceInPlayerInventoryAsync(player: Instance,placeName: string,templatePlaceID: number,description: string):number
Deprecated
GetAssetIdsForPackage(packageAssetId: number):{any}
Deprecated
GetCreatorAssetID(creationID: number):number
Deprecated
SavePlaceAsync(requestParameters: Dictionary?):()
SearchAudio(searchParameters: AudioSearchParams):AudioPages
Deprecated
Inherited Members

API Reference
Properties
AllowInsertFreeAssets
Roblox Script Security
Read Parallel
AssetService.AllowInsertFreeAssets:boolean

Methods
ComposeDecalAsync
Yields
AssetService:ComposeDecalAsync(
decal:Decal, layers:{any}
):()
Parameters
decal:Decal
layers:{any}
Returns
()
Code Samples
Compose a Decal
local AssetService = game:GetService("AssetService")
-- Create two decal instances
local decalA = Instance.new("Decal")
local decalB = Instance.new("Decal")
-- Build composite info table
local compositeInfo = {
{
ColorMap = decalA.ColorMapContent,
RoughnessMap = decalA.RoughnessMapContent,
MetalnessMap = decalA.MetalnessMapContent,
NormalMap = decalA.NormalMapContent,
},
{
ColorMap = Content.fromAssetId(123456),
RoughnessMap = decalB.RoughnessMapContent,
MetalnessMap = decalB.MetalnessMapContent,
NormalMap = decalB.NormalMapContent,
}
}
-- Create a decal to compose onto
local compositeDecal = Instance.new("Decal")
-- Compose an existing decal using AssetService
local success, errorMessage = pcall(function()
AssetService:ComposeDecalAsync(compositeDecal, compositeInfo)
end)
if success then
print("Decal composed successfully!")
-- Logic to show/use the decal goes here
else
warn("Failed to compose decal:", errorMessage)
end

CreateAssetAsync
Yields
Capabilities: AssetCreateUpdate
AssetService:CreateAssetAsync(
object:Object, assetType:Enum.AssetType, requestParameters:Dictionary
Parameters
object:Object
assetType:Enum.AssetType
requestParameters:Dictionary
Default Value: "nil"
Returns
Code Samples
AssetService:CreateAssetAsync
local AssetService = game:GetService("AssetService")
local editableMesh = AssetService:CreateEditableMesh()
-- add vertices, faces, and uvs to the mesh
local requestParameters = {
CreatorId = 123,
CreatorType = Enum.AssetCreatorType.User,
Name = "My asset",
Description = "a good asset",
}
local ok, result, idOrUploadErr = pcall(function()
return AssetService:CreateAssetAsync(editableMesh, Enum.AssetType.Mesh, requestParameters)
end)
if not ok then
warn(`error calling CreateAssetAsync: {result}`)
elseif result == Enum.CreateAssetResult.Success then
print(`success, new asset ID: {idOrUploadErr}`)
else
warn(`upload error in CreateAssetAsync: {result}, {idOrUploadErr}`)
end

CreateAssetVersionAsync
Yields
Capabilities: AssetCreateUpdate
AssetService:CreateAssetVersionAsync(
object:Object, assetType:Enum.AssetType, assetId:number, requestParameters:Dictionary
Parameters
object:Object
assetType:Enum.AssetType
assetId:number
requestParameters:Dictionary
Default Value: "nil"
Returns
Code Samples
AssetService:CreateAssetVersionAsync
local AssetService = game:GetService("AssetService")
local assetIdToUpdate = 321
local model = Instance.new("Model")
local requestParameters = {
CreatorId = 123,
CreatorType = Enum.AssetCreatorType.User,
}
local ok, result, versionOrUploadErr = pcall(function()
return AssetService:CreateAssetVersionAsync(model, Enum.AssetType.Model, assetIdToUpdate, requestParameters)
end)
if not ok then
warn(`error calling CreateAssetVersionAsync: {result}`)
elseif result == Enum.CreateAssetResult.Success then
print(`success, new asset version: {versionOrUploadErr}`)
else
warn(`upload error in CreateAssetVersionAsync: {result}, {versionOrUploadErr}`)
end

CreateDataModelContentAsync
Yields
Capabilities: DynamicGeneration
AssetService:CreateDataModelContentAsync(
content:Content, options:Dictionary?
Parameters
content:Content
options:Dictionary?
Returns

CreateEditableImage
Capabilities: DynamicGeneration
AssetService:CreateEditableImage(editableImageOptions:Dictionary?):EditableImage
Parameters
editableImageOptions:Dictionary?

CreateEditableImageAsync
Yields
Capabilities: AssetRead
AssetService:CreateEditableImageAsync(
content:Content, editableImageOptions:Dictionary?
Parameters
content:Content
editableImageOptions:Dictionary?

CreateEditableMesh
Capabilities: DynamicGeneration
AssetService:CreateEditableMesh(editableMeshOptions:Dictionary?):EditableMesh
Parameters
editableMeshOptions:Dictionary?

CreateEditableMeshAsync
Yields
Capabilities: AssetRead
AssetService:CreateEditableMeshAsync(
content:Content, editableMeshOptions:Dictionary?
Parameters
content:Content
editableMeshOptions:Dictionary?

CreateMeshPartAsync
Yields
Capabilities: Basic
AssetService:CreateMeshPartAsync(
meshContent:Content, options:Dictionary
Parameters
meshContent:Content
options:Dictionary
Default Value: "nil"
Returns

CreatePlaceAsync
Yields
Capabilities: AssetCreateUpdate
AssetService:CreatePlaceAsync(
placeName:string, templatePlaceID:number, description:string
Parameters
placeName:string
templatePlaceID:number
description:string
Returns

CreatePlaceInPlayerInventoryAsync
Deprecated

CreateSurfaceAppearanceAsync
Yields
Capabilities: Basic
AssetService:CreateSurfaceAppearanceAsync(content:Dictionary):SurfaceAppearance
Parameters
content:Dictionary
Code Samples
AssetService:CreateSurfaceAppearanceAsync
local AssetService = game:GetService("AssetService")
local Workspace = game:GetService("Workspace")
-- Red color
local colorEditableImage = AssetService:CreateEditableImage({ Size = Vector2.new(4, 4) })
colorEditableImage:DrawRectangle(Vector2.zero, colorEditableImage.Size, Color3.fromRGB(255, 0, 0), 0, Enum.ImageCombineType.Overwrite)
-- Metalness (only look at the red channel)
local metalnessEditableImage = AssetService:CreateEditableImage({ Size = Vector2.new(1, 1) })
metalnessEditableImage:DrawRectangle(Vector2.zero, metalnessEditableImage.Size, Color3.new(1, 0, 0), 0, Enum.ImageCombineType.Overwrite)
-- Roughness (only look at the red channel)
local roughnessEditableImage = AssetService:CreateEditableImage({ Size = Vector2.new(1, 1) })
roughnessEditableImage:DrawRectangle(Vector2.zero, roughnessEditableImage.Size, Color3.new(0.2, 0, 0), 0, Enum.ImageCombineType.Overwrite)
local surfaceAppearance = AssetService:CreateSurfaceAppearanceAsync({
ColorMap = Content.fromObject(colorEditableImage),
MetalnessMap = Content.fromObject(metalnessEditableImage),
RoughnessMap = Content.fromObject(roughnessEditableImage)
})
local meshPart = Instance.new("MeshPart")
meshPart.Parent = Workspace
-- Apply surface appearance to mesh part
surfaceAppearance.Parent = meshPart

GetAssetIdsForPackage
Deprecated

GetAssetIdsForPackageAsync
Yields
Capabilities: AssetRead
AssetService:GetAssetIdsForPackageAsync(packageAssetId:number):{any}
Parameters
packageAssetId:number
Returns

GetAudioMetadataAsync
Yields
Capabilities: AssetRead
AssetService:GetAudioMetadataAsync(idList:{any}):{any}
Parameters
idList:{any}
Returns
Code Samples
Get Audio Metadata
local AssetService = game:GetService("AssetService")
local SoundService = game:GetService("SoundService")
local trackIDs = {
SoundService.Sound1.SoundId,
SoundService.Sound2.SoundId,
SoundService.Sound3.SoundId,
SoundService.Sound4.SoundId,
}
local success, result = pcall(function()
return AssetService:GetAudioMetadataAsync(trackIDs)
end)
if success then
for i = 1, #trackIDs do
local contentId = "rbxassetid://" .. result[i].AssetId
if trackIDs[i] == contentId then
print(result[i].Title, "by", result[i].Artist)
else
warn("No metadata fetched for requested asset #" .. tostring(i))
end
end
end

GetBundleDetailsAsync
Yields
Capabilities: AssetRead
AssetService:GetBundleDetailsAsync(bundleId:number):Dictionary
Parameters
bundleId:number
Returns
Code Samples
Getting Bundle Details
local AssetService = game:GetService("AssetService")
local BUNDLE_ID = 14
local success, result = pcall(function()
return AssetService:GetBundleDetailsAsync(BUNDLE_ID)
end)
if success then
print(result)
--[[
{
["BundleType"] = "BodyParts",
["Description"] = "The year is 5003, Battlebot 5000 must face his mightiest foe, or face becoming obsolete.",
["Id"] = 14,
["Items"] = {
[1] = {...},
[2] = {
["Id"] = 1678225030,
["Name"] = "SinisterBot 5001 Left Arm",
["Type"] = "Asset"
},
[3] = {...},
[4] = {...},
[5] = {...},
[6] = {...},
[7] = {...}
},
["Name"] = "SinisterBot 5001"
}
--]]
end

GetCreatorAssetID
Deprecated

GetGamePlacesAsync
Yields
Capabilities: AssetRead
AssetService:GetGamePlacesAsync():Instance
Returns
Code Samples
AssetService:GetGamePlacesAsync
local AssetService = game:GetService("AssetService")
local placePages = AssetService:GetGamePlacesAsync()
while true do
for _, place in placePages:GetCurrentPage() do
print("Name:", place.Name)
print("PlaceId:", place.PlaceId)
end
if placePages.IsFinished then
break
end
placePages:AdvanceToNextPageAsync()
end

LoadAssetAsync
Yields
Capabilities: LoadUnownedAsset
AssetService:LoadAssetAsync(assetId:number):Instance
Parameters
assetId:number
Returns

PromptCreateAssetAsync
Yields
Capabilities: AssetCreateUpdate
AssetService:PromptCreateAssetAsync(
player:Player, instance:Instance, assetType:Enum.AssetType
Parameters
player:Player
instance:Instance
assetType:Enum.AssetType
Returns

PromptImportAnimationClipFromVideoAsync
Yields
Capabilities: AssetManagement
AssetService:PromptImportAnimationClipFromVideoAsync(
player:Player, progressCallback:function
Parameters
player:Player
progressCallback:function
Returns

SavePlaceAsync
Yields
Capabilities: AssetCreateUpdate
AssetService:SavePlaceAsync(requestParameters:Dictionary?):()
Parameters
requestParameters:Dictionary?
Returns
()

SearchAudio
Deprecated

SearchAudioAsync
Yields
Capabilities: AssetRead
AssetService:SearchAudioAsync(searchParameters:AudioSearchParams):AudioPages
Parameters
searchParameters:AudioSearchParams
Returns
Code Samples
Getting Music Search Titles
local AssetService = game:GetService("AssetService")
local audioSearchParams = Instance.new("AudioSearchParams")
audioSearchParams.SearchKeyword = "happy"
local success, result = pcall(function()
return AssetService:SearchAudioAsync(audioSearchParams)
end)
if success then
local currentPage = result:GetCurrentPage()
for _, audio in currentPage do
print(audio.Title)
end
else
warn("AssetService error: " .. result)
end
--[[ Returned data format
{
"AudioType": string,
"Artist": string,
"Title": string,
"Tags": {
"string"
},
"Id": number,
"IsEndorsed": boolean,
"Description": string,
"Duration": number,
"CreateTime": string,
"UpdateTime": string,
"Creator": {
"Id": number,
"Name": string,
"Type": number,
"IsVerifiedCreator": boolean
}
}
--]]

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.