Reference API Roblox

Engine API

Website

Related

Reference API Roblox

AssetService

A non-replicated service that handles asset-related queries to the Roblox web API.

This class is not creatable. Instances of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
Tags: [NotCreatable, Service]

Member index 24

HistoryMember
601CreateEditableImageAsync(textureId: Content): EditableImage
602CreateEditableMeshAsync(meshId: Content): EditableMesh
602CreateEditableMeshFromPartAsync(meshPart: Instance): EditableMesh
607CreateEditableMeshStripSkinningAsync(meshId: Content): EditableMesh
619CreateMeshPartAsync(meshId: Content, options: Dictionary = nil): MeshPart
462CreatePlaceAsync(placeName: string, templatePlaceID: int64, description: string = ): int64
462CreatePlaceInPlayerInventoryAsync(player: Instance, placeName: string, templatePlaceID: int64, description: string = ): int64
583DeserializeInstance(serializedInstance: string): Instance
462GetAssetIdsForPackage(packageAssetId: int64): Array
610GetAudioMetadataAsync(idList: Array): Array
462GetBundleDetailsAsync(bundleId: int64): Dictionary
462GetBundleDetailsSync(bundleId: int64): Dictionary
553GetCreatorAssetID(creationID: int64): int64
462GetGamePlacesAsync(): Instance
587PromptCreateAssetAsync(player: Player, instance: Instance, assetType: AssetType): Tuple
594PromptImportAnimationClipFromVideoAsync(player: Player, progressCallback: Function): Tuple
589RegisterUGCValidationFunction(function: Function): null
573SavePlaceAsync(): null
568SearchAudio(searchParameters: AudioSearchParams): AudioPages
614AudioMetadataFailedResponse(requestid: int64)
614AudioMetadataRequest(requestid: int64, request: Array)
614AudioMetadataResponse(requestid: int64, response: Array)
587OpenCreateResultModal(resultType: PromptCreateAssetResult)
567OpenPublishResultModal(resultType: PromptPublishAssetResult)
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553ClassName: string
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
553className: string
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
486GetChildren(): Objects
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
462GetPropertyChangedSignal(property: string): RBXScriptSignal
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsA(className: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
553children(): Objects
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
553getChildren(): Objects
462isA(className: string): bool
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462Changed(property: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)

Removed member index 13

HistoryMember
601CreateDynamicImageAsync(textureId: Content): DynamicImage
602CreateDynamicMeshAsync(meshId: Content): DynamicMesh
558GetAssetThumbnailAsync(assetId: int64, thumbnailSize: Vector2, assetType: int = 0): Tuple
319GetAssetVersions(placeId: int, pageNum: int = 1): Dictionary
319GetPlacePermissions(placeId: int): Dictionary
591LoadImageAsync(textureId: Content): DynamicImage
587PromptPublishAssetAsync(player: Player, instance: Instance, assetType: AssetType): Tuple
319RevertAsset(placeId: int, versionNumber: int): bool
310SetAssetRevertUrl(revertUrl: string): void
310SetAssetVersionsUrl(versionsUrl: string): void
310SetPlaceAccessUrl(accessUrl: string): void
319SetPlacePermissions(placeId: int, accessType: AccessType = Everyone, inviteList: Array = {}): bool
602createDynamicMeshFromPartAsync(meshPart: Instance): DynamicMesh

Description

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

History 73

Members 24

AudioMetadataFailedResponse

Parameters (1)
requestidint64

History 1

AudioMetadataRequest

Parameters (2)
requestidint64
requestArray

History 1

AudioMetadataResponse

Parameters (2)
requestidint64
responseArray

History 1

CreateEditableImageAsync

Parameters (1)
textureIdContent
Returns (1)
EditableImage

Creates a new EditableImage instance 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.

This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

CreateEditableMeshAsync

Parameters (1)
meshIdContent
Returns (1)
EditableMesh

Returns a new EditableMesh instance created from an existing mesh content ID.

This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

CreateEditableMeshFromPartAsync

Parameters (1)
meshPartInstance
Returns (1)
EditableMesh

Returns a new EditableMesh instance created from the MeshId of an existing MeshPart.

This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

CreateEditableMeshStripSkinningAsync

Parameters (1)
meshIdContent
Returns (1)
EditableMesh
This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

CreateMeshPartAsync

Parameters (2)Default
meshIdContent
optionsDictionarynil
Returns (1)
MeshPart

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.

This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

CreatePlaceAsync

Parameters (3)Default
placeNamestring
templatePlaceIDint64
descriptionstring
Returns (1)
int64

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.

This function yields. It will block the calling thread until completion.

History 4

Tags: [Yields]

CreatePlaceInPlayerInventoryAsync

Parameters (4)Default
playerInstance
placeNamestring
templatePlaceIDint64
descriptionstring
Returns (1)
int64
This function yields. It will block the calling thread until completion.

History 4

Tags: [Yields]

DeserializeInstance

Parameters (1)
serializedInstancestring
Returns (1)
Instance

History 1

GetAssetIdsForPackage

Parameters (1)
packageAssetIdint64
Returns (1)
Array

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

This function yields. It will block the calling thread until completion.

History 3

Tags: [Yields]

GetAudioMetadataAsync

Parameters (1)
idListArray
Returns (1)
Array

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

This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

GetBundleDetailsAsync

Parameters (1)
bundleIdint64
Returns (1)
Dictionary

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.

This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

GetBundleDetailsSync

Parameters (1)
bundleIdint64
Returns (1)
Dictionary

History 2

GetCreatorAssetID

Parameters (1)
creationIDint64
Returns (1)
int64

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.

This function is deprecated. It exists only for backward compatibility, and should not be used for new work. GetProductInfo should be used instead.
This function yields. It will block the calling thread until completion.

History 6

Tags: [Yields, Deprecated]

GetGamePlacesAsync

Parameters (0)
No parameters.
Returns (1)
Instance

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

This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

OpenCreateResultModal

Parameters (1)
resultTypePromptCreateAssetResult

History 1

OpenPublishResultModal

Parameters (1)
resultTypePromptPublishAssetResult

History 1

PromptCreateAssetAsync

Parameters (3)
playerPlayer
instanceInstance
assetTypeAssetType
Returns (1)
Tuple

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.

This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

PromptImportAnimationClipFromVideoAsync

Parameters (2)
playerPlayer
progressCallbackFunction
Returns (1)
Tuple
This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

RegisterUGCValidationFunction

Parameters (1)
functionFunction
Returns (1)
null

History 1

SavePlaceAsync

Parameters (0)
No parameters.
Returns (1)
null

Saves the state of the current place. Only works for places that are created with AssetService:CreatePlaceAsync() or which have the API enabled through place settings.

This function yields. It will block the calling thread until completion.

History 3

Tags: [Yields]

SearchAudio

Parameters (1)
searchParametersAudioSearchParams
Returns (1)
AudioPages

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 MessageReason
HTTP 429 (Too Many Requests)AssetService:SearchAudio() has been called too many times.
Unexpected type for data, expected array got nullThe keyword argument was filtered.
This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

Removed members 13

CreateDynamicImageAsync

Parameters (1)
textureIdContent
Returns (1)
DynamicImage
This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

CreateDynamicMeshAsync

Parameters (1)
meshIdContent
Returns (1)
DynamicMesh
This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

GetAssetThumbnailAsync

Parameters (3)Default
assetIdint64
thumbnailSizeVector2
assetTypeint0
Returns (1)
Tuple
This function yields. It will block the calling thread until completion.

History 6

Tags: [Yields]

GetAssetVersions

Parameters (2)Default
placeIdint
pageNumint1
Returns (1)
Dictionary
This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

GetPlacePermissions

Parameters (1)
placeIdint
Returns (1)
Dictionary
This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

LoadImageAsync

Parameters (1)
textureIdContent
Returns (1)
DynamicImage
This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

PromptPublishAssetAsync

Parameters (3)
playerPlayer
instanceInstance
assetTypeAssetType
Returns (1)
Tuple
This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

RevertAsset

Parameters (2)
placeIdint
versionNumberint
Returns (1)
bool
This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

SetAssetRevertUrl

Parameters (1)
revertUrlstring
Returns (1)
void

History 2

SetAssetVersionsUrl

Parameters (1)
versionsUrlstring
Returns (1)
void

History 2

SetPlaceAccessUrl

Parameters (1)
accessUrlstring
Returns (1)
void

History 2

SetPlacePermissions

Parameters (3)Default
placeIdint
accessTypeAccessTypeEveryone
inviteListArray{}
Returns (1)
bool
This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

createDynamicMeshFromPartAsync

Parameters (1)
meshPartInstance
Returns (1)
DynamicMesh
This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

Settings