Service · inherits Instance
AvatarEditorService
A service to support developer Avatar Editors.
About AvatarEditorService
AvatarEditorService is a service to support developer Avatar Editors. It provides methods to modify the player's platform avatar, request information about a user's inventory, and request information about the catalog.
For more information regarding the Avatar Editor, see Avatar Editor Service.
Throttling
The following endpoints on AvatarEditorService have experience-level
throttling:
AvatarEditorService.GetItemDetailsAsyncAvatarEditorService.GetBatchItemDetailsAsyncAvatarEditorService.GetRecommendedAssetsAsyncAvatarEditorService.GetRecommendedBundlesAsyncAvatarEditorService.SearchCatalogAsyncAvatarEditorService.PromptSetFavoriteAvatarEditorService.GetFavoriteAsync
For each experience, this throttling allows you to send up to 100 requests per
second to these AvatarEditorService endpoints, regardless of the number of
servers or user count. Exceeding these limits returns a
429 Too Many Requests error.
Item Details Response
The following methods return item data in a shared response format:
AvatarEditorService.GetItemDetailsAsyncAvatarEditorService.GetBatchItemDetailsAsyncAvatarEditorService.GetBundlesByAssetIdAsyncAvatarEditorService.SearchCatalogAsync
{
"Id": 0,
"ItemType": "Asset",
"AssetType": "Image",
"BundleType": "BodyParts",
"Name": "string",
"Description": "string",
"ProductId": 0,
"ItemStatus": ["New"],
"ItemRestrictions": ["Collectible"],
"BundledItems": [
{
"Id": 0,
"Name": "string",
"Type": "Asset",
"AssetType": "string",
"SupportsHeadShapes": false,
"Owned": false
}
],
"IsRecolorable": false,
"CollectibleItemId": "string",
"TotalQuantity": 0,
"UnitsAvailableForConsumption": 0,
"QuantityLimitPerUser": 0,
"HasResellers": false,
"OffSaleDeadline": null,
"Price": 0,
"PremiumPricing": {
"PremiumDiscountPercentage": 0,
"PremiumPriceInRobux": 0
},
"LowestPrice": 0,
"LowestResalePrice": 0,
"PriceStatus": "string",
"SaleLocationType": "ShopAndAllExperiences",
"PurchaseCount": 0,
"FavoriteCount": 0,
"CreatorType": "User",
"CreatorTargetId": 0,
"CreatorName": "string",
"CreatorHasVerifiedBadge": false,
"SupportsHeadShapes": false,
"TimedOptions": [
{ "Duration": 259200, "Price": 30 },
{ "Duration": 604800, "Price": 40 },
{ "Duration": 1209600, "Price": 50 }
]
}
Basic Information
Bundle Information
Collectible Information
Pricing and Sale Information
Creator Information
Timed Options Information
SaleLocationType Values
| Value | Description |
|---|---|
NotApplicable |
Default value, should not occur in practice. |
ShopOnly |
Item can only be purchased in the Roblox catalog shop. |
MyExperiencesOnly |
Item can only be purchased in the creator's experiences. |
ShopAndMyExperiences |
Item can be purchased in the Roblox catalog shop or the creator's experiences. |
ExperiencesById |
Item can only be purchased in a specific list of experiences. |
ShopAndAllExperiences |
Item can be purchased in the Roblox catalog shop and all experiences. |
ExperiencesDevApiOnly |
Item can only be purchased in experiences via developer APIs. |
ShopAndExperiencesById |
Item can be purchased in the Roblox catalog shop or a whitelisted list of experiences. |
itemRestrictions Values
| itemRestrictions | Limited or Unlimited |
|---|---|
empty |
Unlimited |
Collectible |
UGC Limited |
Limited |
Roblox Limited |
LimitedUnique |
Roblox Limited Unique |
Methods 22
CheckApplyDefaultClothingAsync
(humanoidDescription: HumanoidDescription) → HumanoidDescriptionYieldsUsed to apply default clothing to theHumanoidDescriptionif necessary.Returns a new
HumanoidDescriptionwith the Shirt and Pants properties updated if necessary. Returnsnilif default clothing was not needed.Default clothing is necessary if the HumanoidDescription does not currently have Shirt and Pants equipped and the body colors are too similar.
ConformToAvatarRulesAsync
(humanoidDescription: HumanoidDescription) → HumanoidDescriptionYieldsReturns a copy of the givenHumanoidDescriptionthat conforms to the platform Avatar rules.This method also remaps classic face and classic head assets to their corresponding Dynamic Head asset IDs, with the appropriate
HeadShapepre-applied. This remapping happens automatically and requires no code changes.GetAccessoryType
(avatarAssetType: AvatarAssetType) → AccessoryTypeReturns theAccessoryTypethat corresponds to the givenAvatarAssetType.Returns the
AccessoryTypethat corresponds to the givenAvatarAssetType, which is useful for grouping avatar assets by the accessory slot they occupy.The mapping covers accessory asset types — for example,
AvatarAssetType.HairAccessorymaps toAccessoryType.Hair, and layered-clothing types such asAvatarAssetType.ShirtAccessorymap toAccessoryType.Shirt. AnAvatarAssetTypethat does not correspond to an accessory (for example, an animation or a body part) returnsAccessoryType.Unknown.This method returns immediately; it does not yield or perform a web request.
GetAvatarRulesAsync
() → DictionaryYieldsReturns the platform Avatar rules for things such as scaling, default shirts and pants, number of wearable assets.This function returns the platform Avatar rules for things like scaling, default shirts and pants, number of wearable assets, ect.
The returned table includes the following fields:
{ "PlayerAvatarTypes": [ "R6" ], "Scales": {}, "WearableAssetTypes": [ { "MaxNumber": 0, "Id": 0, "Name": "string" } ], "BodyColorsPalette": [ { "BrickColorId": 0, "NexColor": "string", "Name": "string" } ], "BasicBodyColorsPalette": [ { "BrickColorId": 0, "HexColor": "string", "Name": "string" } ], "MinimumDeltaEBodyColorDifference": 0, "ProportionsAndBodyTypeEnabledForUser": true, "DefaultClothingAssetLists": { "DefaultShirtAssetIds": [ 0 ], "DefaultPantAssetIds": [ 0 ] }, "BundlesEnabledForUser": true, "EmotesEnabledForUser": true }GetBatchItemDetailsAsync
(itemIds: Array, itemType: AvatarItemType) → ArrayYieldsGets the item details for a list of items at once.Gets the item details for a list of items at once. More efficient than
AvatarEditorService.GetItemDetailsAsyncif you need to get the item details for multiple items.Returns an array of items (see Item Details Response above in summary). Each item includes the
TimedOptionsfield when the asset supports timed ownership.GetBundlesByAssetIdAsync
(assetId: int64, limit: int64 = 10) → CatalogPagesYieldsReturns aCatalogPagesobject containing bundles that include the given asset.Returns a paginated list of bundles that contain the specified asset. Results are returned in ascending order by date created. Each page entry uses the Item Details Response format (see service description above).
GetFavoriteAsync
(itemId: int64, itemType: AvatarItemType) → booleanYieldsReturns if thePlayers.LocalPlayerhas favorited the given bundle or asset.This function returns if the
Players.LocalPlayerhas favorited the given bundle or asset.GetHeadShapesAsync
() → ArrayYieldsReturns an array of head shape names that thePlayers.LocalPlayerowns.Each head shape corresponds to a classic head owned by the user and can be applied to any Dynamic Head that supports shape swapping (see
BodyPartDescription.HeadShape).This method requires the user to have accepted the
AvatarEditorService.PromptAllowInventoryReadAccessprompt.GetInventoryAsync
(assetTypes: Array) → InventoryPagesYieldsReturns anInventoryPagesobject with information about owned items in the users inventory with the given AvatarAssetTypes.Returns an
InventoryPagesobject with information about owned items in the users inventory with the givenAvatarAssetTypes.The returned table includes the following fields:
[ { "AssetId": 0, "AssetType": "string", "Created": "string", "Name": "string", "CreatedTime": DateTime, "ExpirationTime": DateTime, } ]GetItemDetailsAsync
(itemId: int64, itemType: AvatarItemType) → DictionaryYieldsReturns the item details for the given item.This function returns the item details for the given item. It accepts two parameters - the first indicating the ID of the item being retrieved and the second indicating its
AvatarItemType.The response includes all fields from Item Details Response (see above in summary), plus the following additional fields specific to single-item queries:
GetOutfitDetailsAsync
(outfitId: int64) → DictionaryYieldsReturns the outfit details for the given outfit.This function returns the outfit details for the given outfit. It accepts one parameter: the ID of the outfit.
Data returns in the following format:
{ "Assets": [ { "AssetType": { "Id": 31, "Name": "RightLeg" }, "CurrentVersionId": 16447385805, "Id": 11584239464, "Name": "Anime Female - Right Leg", "SupportsHeadShapes": false } ], "BodyColors": { "HeadColor": Color3(204, 142, 105), "LeftArmColor": Color3(204, 142, 105), "LeftLegColor": Color3(204, 142, 105), "RightArmColor": Color3(204, 142, 105), "RightLegColor": Color3(204, 142, 105), "TorsoColor": Color3(204, 142, 105) }, "Id": 14703770624, "IsEditable": true, "Name": "Your Costume", "OutfitType": "Avatar", "PlayerAvatarType": "R15", "Scale": { "BodyType": 0, "Depth": 1, "Head": 1, "Height": 1, "Proportion": 0, "Width": 1 }, }GetOutfitsAsync
(outfitSource: OutfitSource = All, outfitType: OutfitType = All) → OutfitPagesYieldsReturns outfit data for thePlayers.LocalPlayer.This function returns outfit data for the
Players.LocalPlayer. This would be used withPlayers.GetHumanoidDescriptionFromOutfitIdAsyncto update the players character to the outfit. Access to this would also depend onAvatarEditorService.PromptAllowInventoryReadAccessbeing accepted by the user.The returned table includes the following fields:
[ { "Id": 0, "Name": "string", "IsEditable": true } ]GetRecommendedAssetsAsync
(assetType: AvatarAssetType, contextAssetId: int64 = 0) → ArrayYieldsReturns a list of recommended assets based on a givenAssetTypeand asset ID.Returns a list of recommended assets based on a given
AssetTypeand asset ID. Use this to gather a list of similar assets to the asset provided. Take a look at the code sample below for more information on possible usages for this function.Data is in the format:
[ { "Item": { "AssetId": 0, "Name": "string", "Price": 0, "PremiumPrice": 0 }, "Creator": { "CreatorId": 0, "CreatorType": "string", "Name": "string" }, "Product": { "Id": 0, "PriceInRobux": 0, "IsForSale": true, "IsResellable": true, "IsLimited": true, "IsLimitedUnique": true, "TotalPrivateSales": 0, "OffsaleDeadline": "string", "IsFree": true } } ]GetRecommendedBundlesAsync
(bundleId: int64) → ArrayYieldsReturns a list of recommended bundles for a given bundle id.This function returns a list of recommended bundles for a given bundle id.
Data is in the format:
[ { "Id": 0, "Name": "string", "Description": "string", "BundleType": "string", "Items": [ { "Owned": true, "Id": 0, "Name": "string", "Type": "string", "AssetType": "string", "SupportsHeadShapes": false } ], "Creator": { "Id": 0, "Name": "string", "Type": "string" }, "Product": { "Id": 0, "Type": "string", "IsPublicDomain": true, "IsForSale": true, "PriceInRobux": 0, "PremiumPricing": { "PremiumDiscountPercentage": 0, "PremiumPriceInRobux": 0 } } } ]PromptAllowInventoryReadAccess
() → ()Prompts thePlayers.LocalPlayerto allow the developer to read what items the user has in their inventory and other avatar editor related information.Prompts the
Players.LocalPlayerto allow the developer to read what items the user has in their inventory and other avatar editor related information. The prompt needs to be confirmed by the user for the developer to useAvatarEditorService.GetInventoryAsync,AvatarEditorService.GetOutfitsAsyncandAvatarEditorService.GetFavoriteAsync. Permission does not persist between sessions.PromptCreateOutfit
(outfit: HumanoidDescription, rigType: HumanoidRigType, outfitOptions: Dictionary = nil, outfitType: Variant) → ()Prompts thePlayers.LocalPlayerto save the givenHumanoidDescriptionas an outfit.Prompts the
Players.LocalPlayerto save the givenHumanoidDescriptionas an outfit. Does not yield. The result can be retrieved by listening to theAvatarEditorService.PromptCreateOutfitCompletedevent.PromptDeleteOutfit
(outfitId: int64) → ()Prompts thePlayers.LocalPlayerto delete the given outfit.Prompts the
Players.LocalPlayerto delete the given outfit. Does not yield. The result can be retrieved by listening to theAvatarEditorService.PromptDeleteOutfitCompletedevent.PromptRenameOutfit
(outfitId: int64) → ()Prompts thePlayers.LocalPlayerto rename the given outfit.Prompts the
Players.LocalPlayerto rename the given outfit. Does not yield. The result can be retrieved by listening to theAvatarEditorService.PromptRenameOutfitCompletedevent.PromptSaveAvatar
(humanoidDescription: HumanoidDescription, rigType: HumanoidRigType) → ()Prompts thePlayers.LocalPlayerto update their avatar based on the givenHumanoidDescriptionandHumanoidRigTypeof R6 or R15.This function prompts the
Players.LocalPlayerto update their avatar based on the givenHumanoidDescriptionandHumanoidRigType(R6 or R15). Does not yield and can get the result by listening to the PromptSaveAvatarCompleted event. This is similar to how other prompts such as PromptPurchase work.PromptSetFavorite
(itemId: int64, itemType: AvatarItemType, shouldFavorite: boolean) → ()Prompts thePlayers.LocalPlayerto favorite or unfavorite the given asset or bundle.This function prompts the
Players.LocalPlayerto favorite or unfavorite the given asset or bundle.PromptUpdateOutfit
(outfitId: int64, updatedOutfit: HumanoidDescription, rigType: HumanoidRigType) → ()Prompts thePlayers.LocalPlayerto update the given outfit.Prompts the
Players.LocalPlayerto update the given outfit with the given HumanoidDescription.SearchCatalogAsync
(searchParameters: CatalogSearchParams) → CatalogPagesYieldsReturns aCatalogPagesobject containing the result of the given search.This function returns a
CatalogPagesobject containing the result of the given search.Each item in the returned pages uses the Item Details Response format (see above in summary), including the
TimedOptionsfield for assets that support timed ownership.Use
SalesTypeFilter.TimedOptionsinCatalogSearchParamsto filter results to only items with timed options available.
Events 7
PromptAllowInventoryReadAccessCompleted
AvatarEditorService.PromptAllowInventoryReadAccessCompleted:Connect(function(result))Fires when theAvatarEditorService.PromptAllowInventoryReadAccessprompt is responded to by the user.This event fires when the
AvatarEditorService.PromptAllowInventoryReadAccessprompt is responded to by the user. It can only return the Success or PermissionDeniedenumstatuses as it does not perform any web requests which could fail.PromptCreateOutfitCompleted
AvatarEditorService.PromptCreateOutfitCompleted:Connect(function(result, failureType))Fires when the PromptSaveOutfit operation is completed.This event fires when the PromptSaveOutfit operation is completed. It gives a status
enumindicating whether the prompt succeeded, failed or permission was not granted by the user.PromptDeleteOutfitCompleted
AvatarEditorService.PromptDeleteOutfitCompleted:Connect(function(result))Fires when the PromptDeleteOutfit operation is completed.Fires when the PromptDeleteOutfit operation is completed. It gives a status
enumindicating whether the prompt succeeded, failed or permission was not granted by the user.PromptRenameOutfitCompleted
AvatarEditorService.PromptRenameOutfitCompleted:Connect(function(result))Fires when the PromptRenameOutfit operation is completed.Fires when the PromptRenameOutfit operation is completed. It gives a status
enumindicating whether the prompt succeeded, failed or permission was not granted by the user.PromptSaveAvatarCompleted
AvatarEditorService.PromptSaveAvatarCompleted:Connect(function(result, humanoidDescription))Fires when theAvatarEditorService.PromptSaveAvataroperation is completed.This event fires when the
AvatarEditorService.PromptSaveAvataroperation is completed. It gives a statusenumindicating whether the prompt succeeded, failed or permission was not granted by the user.PromptSetFavoriteCompleted
AvatarEditorService.PromptSetFavoriteCompleted:Connect(function(result))Fires when theAvatarEditorService.PromptSetFavoriteoperation is completed.Fires when the
AvatarEditorService.PromptSetFavoriteoperation is completed. It gives a statusenumindicating whether the prompt succeeded, failed or permission was not granted by the user.PromptUpdateOutfitCompleted
AvatarEditorService.PromptUpdateOutfitCompleted:Connect(function(result))Fires when theAvatarEditorService.PromptUpdateOutfitoperation is completed.Fires when the
AvatarEditorService.PromptUpdateOutfitoperation is completed. It gives a statusenumindicating whether the prompt succeeded, failed or permission was not granted by the user.
AvatarEditorService also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.