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 29

HistoryMember
648CheckTextureAlphaAsync(textureId: ContentId): bool
652CreateAssetAsync(object: Object, assetType: AssetType, requestParameters: Dictionary = nil): Tuple
652CreateAssetVersionAsync(object: Object, assetType: AssetType, assetId: int64, requestParameters: Dictionary = nil): Tuple
648CreateEditableImage(editableImageOptions: Dictionary?): Object
648CreateEditableImageAsync(content: Content, editableImageOptions: Dictionary?): Object
648CreateEditableMesh(editableMeshOptions: Dictionary?): Object
648CreateEditableMeshAsync(content: Content, editableMeshOptions: Dictionary?): Object
649CreateEditableMeshFromPartAsync(meshPart: Instance): Object
648CreateEditableMeshStripSkinningAsync(meshId: ContentId): Object
649CreateMeshPartAsync(meshContent: 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
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
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
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: 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
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

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 96

Members 29

AudioMetadataFailedResponse

Parameters (1)
requestidint64

History 1

AudioMetadataRequest

Parameters (2)
requestidint64
requestArray

History 1

AudioMetadataResponse

Parameters (2)
requestidint64
responseArray

History 1

CheckTextureAlphaAsync

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

History 1

Tags: [Yields]

CreateAssetAsync

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

History 1

Tags: [Yields]

CreateAssetVersionAsync

Parameters (4)Default
objectObject
assetTypeAssetType
assetIdint64
requestParametersDictionarynil
Returns (1)
Tuple
This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

CreateEditableImage

Parameters (1)
editableImageOptionsDictionary?
Returns (1)
Object

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.

History 3

CreateEditableImageAsync

Parameters (2)
contentContent
editableImageOptionsDictionary?
Returns (1)
Object

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 Enabling EditableImage for Published Experiences and Permissions sections of EditableImage for special considerations when using this API.

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

History 4

Tags: [Yields]

CreateEditableMesh

Parameters (1)
editableMeshOptionsDictionary?
Returns (1)
Object

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.

History 3

CreateEditableMeshAsync

Parameters (2)
contentContent
editableMeshOptionsDictionary?
Returns (1)
Object

Returns a new EditableMesh object created from an existing mesh content ID. By default a 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 EditableMesh for Published Experiences and Permissions sections of EditableMesh for special considerations when using this API.

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

History 4

Tags: [Yields]

CreateEditableMeshFromPartAsync

Parameters (1)
meshPartInstance
Returns (1)
Object

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

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

History 4

Tags: [Yields, Deprecated]

CreateEditableMeshStripSkinningAsync

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

History 3

Tags: [Yields]

CreateMeshPartAsync

Parameters (2)Default
meshContentContent
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 4

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