Class
AvatarEditorService
NotCreatableService
A service to support developer Avatar Editors.
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:GetItemDetailsAsync()AvatarEditorService:GetBatchItemDetailsAsync()AvatarEditorService:GetBundlesByAssetIdAsync()AvatarEditorService: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#
| Field | Type | Description |
|---|---|---|
Id |
number | The unique identifier of the item. |
ItemType |
string | The type of item: "Asset" or "Bundle". Corresponds to Enum.AvatarItemType. |
AssetType |
string | The asset type. Corresponds to Enum.AvatarAssetType values (e.g., "Hat", "Shirt"). Only present if ItemType is "Asset". |
SupportsHeadShapes |
boolean | Whether the asset supports head shape swapping. Only present if AssetType is "DynamicHead". |
BundleType |
string | The bundle type. Corresponds to Enum.BundleType values (e.g., "BodyParts", "Animations"). Only present if ItemType is "Bundle". |
Name |
string | The display name of the item. |
Description |
string | The item's description text. |
ProductId |
number | The product ID associated with this item. |
ItemStatus |
array | An array of status strings (e.g., "New", "Sale", "XboxExclusive", "AmazonExclusive"). |
ItemRestrictions |
array | An array of restriction strings. See the itemRestrictions table below. |
Bundle Information#
| Field | Type | Description |
|---|---|---|
BundledItems |
array | An array of items contained in the bundle. Only present if ItemType is "Bundle". Each entry contains: |
Id: The unique identifier of the bundled item. |
||
Name: The display name of the bundled item. |
||
Type: The type of the bundled item (e.g., "Asset"). |
||
AssetType: The asset type as a string. Corresponds to Enum.AvatarAssetType values (e.g., "Hat", "DynamicHead"). |
||
SupportsHeadShapes: Whether the asset supports head shape swapping. Only present if AssetType is "DynamicHead". |
||
Owned: Whether the bundled item is owned by the current user. |
||
IsRecolorable |
boolean | Whether the bundle supports skin tone matching. Only applies to BodyParts and DynamicHead bundles. |
Collectible Information#
| Field | Type | Description |
|---|---|---|
CollectibleItemId |
string | The unique item ID of the collectible. |
TotalQuantity |
number | The total quantity of the collectible available for purchase (not resale). |
UnitsAvailableForConsumption |
number | The number of units available for purchase. Only applies to Limited items with remaining stock. |
QuantityLimitPerUser |
number | Maximum number of the same collectible item a user can own. |
HasResellers |
boolean | true when item is a Limited collectible and there are copies available for resale. |
OffSaleDeadline |
string | The date/time when the item goes off sale. |
Pricing and Sale Information#
| Field | Type | Description |
|---|---|---|
Price |
number | The price in Robux. 0 if free or not for sale. |
PremiumPricing |
table | Premium pricing information. Contains the following fields: |
PremiumDiscountPercentage: The discount percentage for Premium members. |
||
PremiumPriceInRobux: The discounted price in Robux for Premium members. |
||
LowestPrice |
number | The lowest resale price for Limited items. |
LowestResalePrice |
number | The lowest resale price for the collectible in Robux. |
PriceStatus |
string | The price status (e.g., "Free", "Off Sale", "No Resellers"). |
SaleLocationType |
string | The type of sale location setting. See SaleLocationType values below. |
PurchaseCount |
number | The total number of times this item has been purchased. |
FavoriteCount |
number | The total number of users who have favorited this item. |
Creator Information#
| Field | Type | Description |
|---|---|---|
CreatorType |
string | Either User or Group. See Enum.CreatorType. |
CreatorTargetId |
number | The ID of the creator user or group. |
CreatorName |
string | The display name of the creator. |
CreatorHasVerifiedBadge |
boolean | Boolean of whether the creator has a verified badge. |
Timed Options Information#
| Field | Type | Description |
|---|---|---|
TimedOptions |
array | Optional. An array of available timed options with durations and prices. Only present for assets that support timed ownership. Do not hardcode duration values; always retrieve them from the API as available options may change. Each entry contains: |
Duration: The duration in seconds (e.g. 259200 for 3 days, 604800 for 7 days). |
||
Price: The price in Robux for this duration. |
||
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 34#
| CheckApplyDefaultClothing | Used to apply default clothing to the HumanoidDescription if
necessary.Yields |
| CheckApplyDefaultClothingAsync | Used to apply default clothing to the HumanoidDescription if
necessary.Yields |
| ConformToAvatarRules | Deprecated. Returns a copy of the given HumanoidDescription that
conforms to the platform Avatar rules.Yields |
| ConformToAvatarRulesAsync | Returns a copy of the given HumanoidDescription that conforms to
the platform Avatar rules.Yields |
| GetAccessoryType | Returns the AccessoryType that corresponds to the given
AvatarAssetType. |
| GetAvatarRules | Returns the platform Avatar rules for things such as scaling, default shirts and pants, number of wearable assets.Yields |
| GetAvatarRulesAsync | Returns the platform Avatar rules for things such as scaling, default shirts and pants, number of wearable assets.Yields |
| GetBatchItemDetails | Gets the item details for a list of items at once.Yields |
| GetBatchItemDetailsAsync | Gets the item details for a list of items at once.Yields |
| GetBundlesByAssetIdAsync | Returns a CatalogPages object containing bundles that include the
given asset.Yields |
| GetFavorite | Returns if the Players.LocalPlayer has favorited the given bundle
or asset.Yields |
| GetFavoriteAsync | Returns if the Players.LocalPlayer has favorited the given bundle
or asset.Yields |
| GetHeadShapesAsync | Returns an array of head shape names that the Players.LocalPlayer
owns.Yields |
| GetInventory | Returns an InventoryPages object with information about owned
items in the users inventory with the given AvatarAssetTypes.Yields |
| GetInventoryAsync | Returns an InventoryPages object with information about owned
items in the users inventory with the given AvatarAssetTypes.Yields |
| GetItemDetails | Returns the item details for the given item.Yields |
| GetItemDetailsAsync | Returns the item details for the given item.Yields |
| GetOutfitDetails | Returns the outfit details for the given outfit.Yields |
| GetOutfitDetailsAsync | Returns the outfit details for the given outfit.Yields |
| GetOutfits | Returns outfit data for the Players.LocalPlayer.Yields |
| GetOutfitsAsync | Returns outfit data for the Players.LocalPlayer.Yields |
| GetRecommendedAssets | Returns a list of recommended assets based on a given AssetType and
asset ID.Yields |
| GetRecommendedAssetsAsync | Returns a list of recommended assets based on a given AssetType and
asset ID.Yields |
| GetRecommendedBundles | Returns a list of recommended bundles for a given bundle id.Yields |
| GetRecommendedBundlesAsync | Returns a list of recommended bundles for a given bundle id.Yields |
| PromptAllowInventoryReadAccess | Prompts the Players.LocalPlayer to allow the developer to read
what items the user has in their inventory and other avatar editor related
information. |
| PromptCreateOutfit | Prompts the Players.LocalPlayer to save the given
HumanoidDescription as an outfit. |
| PromptDeleteOutfit | Prompts the Players.LocalPlayer to delete the given outfit. |
| PromptRenameOutfit | Prompts the Players.LocalPlayer to rename the given outfit. |
| PromptSaveAvatar | Prompts the Players.LocalPlayer to update their avatar based on
the given HumanoidDescription and HumanoidRigType of R6 or
R15. |
| PromptSetFavorite | Prompts the Players.LocalPlayer to favorite or unfavorite the
given asset or bundle. |
| PromptUpdateOutfit | Prompts the Players.LocalPlayer to update the given outfit. |
| SearchCatalog | Returns a CatalogPages object containing the result of the given
search.Yields |
| SearchCatalogAsync | Returns a CatalogPages object containing the result of the given
search.Yields |
CheckApplyDefaultClothing(humanoidDescription: HumanoidDescription): HumanoidDescription#
YieldsDeprecated
Deprecated in favor of
AvatarEditorService:CheckApplyDefaultClothingAsync(). This method
has the same behavior: it returns a new HumanoidDescription with
the Shirt and Pants properties updated if necessary, or nil if 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.
| Name | Type | Default | Description |
|---|---|---|---|
humanoidDescription | HumanoidDescription | The HumanoidDescription to check if default clothing is required. |
Returns
HumanoidDescription— Returns a HumanoidDescription if default clothing was necessary. Otherwise returnsnil.
CheckApplyDefaultClothingAsync(humanoidDescription: HumanoidDescription): HumanoidDescription#
Yields
Returns a new HumanoidDescription with the Shirt and Pants
properties updated if necessary. Returns nil if 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.
| Name | Type | Default | Description |
|---|---|---|---|
humanoidDescription | HumanoidDescription | The HumanoidDescription to check if default clothing is required. |
Returns
HumanoidDescription— Returns a HumanoidDescription if default clothing was necessary. Otherwise returnsnil.
ConformToAvatarRules(humanoidDescription: HumanoidDescription): HumanoidDescription#
YieldsDeprecated
Deprecated in favor of
AvatarEditorService:ConformToAvatarRulesAsync(). Clones the given
description and adjusts scale values, accessory counts, accessory
adjustments, default clothing, and layered-clothing limits to comply with
the platform Avatar rules. It also remaps classic face and classic head
assets to their corresponding Dynamic Head asset IDs.
| Name | Type | Default | Description |
|---|---|---|---|
humanoidDescription | HumanoidDescription | The HumanoidDescription to conform to the platform Avatar
rules. |
Returns
HumanoidDescription— A newHumanoidDescriptionthat conforms to the platform Avatar rules.
ConformToAvatarRulesAsync(humanoidDescription: HumanoidDescription): HumanoidDescription#
Yields
This method also remaps classic face and classic head assets to their
corresponding Dynamic Head asset IDs, with the appropriate
HeadShape pre-applied. This
remapping happens automatically and requires no code changes.
| Name | Type | Default | Description |
|---|---|---|---|
humanoidDescription | HumanoidDescription | The HumanoidDescription to conform. |
Returns
HumanoidDescription— A newHumanoidDescriptionthat conforms to the platform Avatar rules.
GetAccessoryType(avatarAssetType: AvatarAssetType): AccessoryType#
Returns the AccessoryType that corresponds to the given
AvatarAssetType, which is useful for grouping avatar assets by the
accessory slot they occupy.
The mapping covers accessory asset types — for example,
AvatarAssetType.HairAccessory maps to AccessoryType.Hair,
and layered-clothing types such as AvatarAssetType.ShirtAccessory
map to AccessoryType.Shirt. An AvatarAssetType that does not
correspond to an accessory (for example, an animation or a body part)
returns AccessoryType.Unknown.
This method returns immediately; it does not yield or perform a web request.
| Name | Type | Default | Description |
|---|---|---|---|
avatarAssetType | AvatarAssetType | The AvatarAssetType to convert to its corresponding
AccessoryType. |
Returns
AccessoryType— TheAccessoryTypecorresponding to the givenAvatarAssetType, orAccessoryType.Unknownif the asset type has no matching accessory type.
GetAvatarRules(): Dictionary#
YieldsDeprecated
Deprecated in favor of AvatarEditorService:GetAvatarRulesAsync().
This method has the same behavior: it returns a dictionary containing the
platform Avatar rules. See
AvatarEditorService:GetAvatarRulesAsync() for the response format.
Returns
Dictionary— A dictionary containing the platform Avatar rules for things like scaling, default shirts and pants, number of wearable assets, ect. See the example return in the main description above.
GetAvatarRulesAsync(): Dictionary#
Yields
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
}Returns
Dictionary— A dictionary containing the platform Avatar rules for things like scaling, default shirts and pants, number of wearable assets, ect. See the example return in the main description above.
GetBatchItemDetails(itemIds: Array, itemType: AvatarItemType): Array#
YieldsDeprecated
Deprecated in favor of
AvatarEditorService:GetBatchItemDetailsAsync(). This method has
the same behavior: it gets the item details for a list of items at once
and returns an array of item details in the Item Details Response format.
| Name | Type | Default | Description |
|---|---|---|---|
itemIds | Array | The list of item ids to get details of. | |
itemType | AvatarItemType | The type of the item ids provided. |
Returns
Array— Returns an array of item details. SeeAvatarEditorService:GetBatchItemDetailsAsync()for the response format.
GetBatchItemDetailsAsync(itemIds: Array, itemType: AvatarItemType): Array#
Yields
Gets the item details for a list of items at once. More efficient than
AvatarEditorService:GetItemDetailsAsync() if 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 TimedOptions field when the asset supports timed
ownership.
| Name | Type | Default | Description |
|---|---|---|---|
itemIds | Array | The list of item ids to get details of. | |
itemType | AvatarItemType | The type of the item ids provided. |
Returns
Array— Returns an array of item details.
GetBundlesByAssetIdAsync(assetId: int64, limit: int64 = 10): CatalogPages#
Yields
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).
| Name | Type | Default | Description |
|---|---|---|---|
assetId | int64 | The ID of the asset to find bundles for. | |
limit | int64 | 10 | The number of results per page. Accepts 10, 25, 50, and 100. |
Returns
CatalogPages— ACatalogPagesobject containing bundles that include the given asset.
GetFavorite(itemId: int64, itemType: AvatarItemType): boolean#
YieldsDeprecated
Deprecated in favor of AvatarEditorService:GetFavoriteAsync().
This method has the same behavior: it returns whether the
Players.LocalPlayer has favorited the given bundle or asset.
| Name | Type | Default | Description |
|---|---|---|---|
itemId | int64 | The ID of the specified asset or bundle. | |
itemType | AvatarItemType | The AvatarItemType of the specified asset or bundle. |
Returns
boolean— Whether theLocalPlayerhas favorited the given bundle or asset.
GetFavoriteAsync(itemId: int64, itemType: AvatarItemType): boolean#
Yields
This function returns if the Players.LocalPlayer has favorited the
given bundle or asset.
| Name | Type | Default | Description |
|---|---|---|---|
itemId | int64 | The ID of the specified asset or bundle. | |
itemType | AvatarItemType | The AvatarItemType of the specified asset or bundle. |
Returns
boolean— Whether theLocalPlayerhas favorited the given bundle or asset.
GetHeadShapesAsync(): Array#
Yields
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:PromptAllowInventoryReadAccess() prompt.
Returns
Array— An array of strings, each identifying a head shape owned byPlayers.LocalPlayer. Possible values include:"Blockhead","Cheeks","Chiseled","ClassicFemaleV2","ClassicMaleV2","CoolThing","Default","EraserHead","FatHead","FlatTop","GoldenKorbloxGeneral","GoldenMrRobot","KnightOfChivalry","KnightOfCourage","ManHead","MercilessNinja","MrToilet","Narrow","NeoClassicFemaleV2","NeoClassicMaleV2","Paragon","Peabrain","Perfection","RobloxClassic","Roll","Roundy","RoxBox","StrongJaw","TheEngineer","Trim","WomanHead".
GetInventory(assetTypes: Array): InventoryPages#
YieldsDeprecated
Deprecated in favor of AvatarEditorService:GetInventoryAsync().
This method has the same behavior: it returns an InventoryPages
object with information about items owned by the
Players.LocalPlayer that match the given
AvatarAssetTypes. See
AvatarEditorService:GetInventoryAsync() for the response format.
| Name | Type | Default | Description |
|---|---|---|---|
assetTypes | Array | The AvatarAssetType that can will be checked for in the
player's inventory. |
Returns
InventoryPages— AnInventoryPagesobject containing information about owned items matching the given asset types.
GetInventoryAsync(assetTypes: Array): InventoryPages#
Yields
Returns an InventoryPages object with information about owned
items in the users inventory with the given
AvatarAssetTypes.
The returned table includes the following fields:
[
{
"AssetId": 0,
"AssetType": "string",
"Created": "string",
"Name": "string",
"CreatedTime": DateTime,
"ExpirationTime": DateTime,
}
]| Field | Type | Description |
|---|---|---|
AssetId |
number | The asset ID. |
AssetType |
string | The asset type as a string. |
Created |
string | ISO 8601 timestamp of when the item was acquired. |
Name |
string | The display name of the item. |
CreatedTime |
DateTime | When the item was acquired, as a Datatype.DateTime value. |
ExpirationTime |
DateTime | Optional. The absolute time when the item's timed ownership expires. Only present for items acquired via a timed option. Absent for permanently owned items. |
| Name | Type | Default | Description |
|---|---|---|---|
assetTypes | Array | The AvatarAssetType that can will be checked for in the
player's inventory. |
Returns
InventoryPages— AnInventoryPagesobject containing information about owned items matching the given asset types.
GetItemDetails(itemId: int64, itemType: AvatarItemType): Dictionary#
YieldsDeprecated
Deprecated in favor of AvatarEditorService:GetItemDetailsAsync().
This method has the same behavior: it returns a table containing the item
details for the given item. See
AvatarEditorService:GetItemDetailsAsync() for the response format.
| Name | Type | Default | Description |
|---|---|---|---|
itemId | int64 | The ID of the item whose details are being retrieved. | |
itemType | AvatarItemType | An enum value indicating the type of item whose details are being retrieved. |
Returns
Dictionary— A table containing the item info for the retrieved item. See above for a sample table.
GetItemDetailsAsync(itemId: int64, itemType: AvatarItemType): Dictionary#
Yields
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:
| Field | Type | Description |
|---|---|---|
Owned |
boolean | Whether the item is owned by the current user. |
IsPurchasable |
boolean | Whether the item can be purchased by the current user. |
ExpectedSellerId |
number | The user ID of the lowest private seller if resellable, or the creator's target ID otherwise. Used when calling purchase APIs. |
CreatingUniverseId |
number | If this asset was created in an experience via the In-Experience Creation (IEC) pipeline, this is the universe ID of the creating experience. nil for standard catalog items. Use this to display attribution (e.g., "Created in [experience]") in your avatar editor UI. |
ExpirationTime |
DateTime | Optional. The absolute time when the item's timed ownership expires. Only present when the item is owned by the current user via a timed option. Absent for permanently owned items. |
| Name | Type | Default | Description |
|---|---|---|---|
itemId | int64 | The ID of the item whose details are being retrieved. | |
itemType | AvatarItemType | An enum value indicating the type of item whose details are being retrieved. |
Returns
Dictionary— A table containing the item info for the retrieved item.
GetOutfitDetails(outfitId: int64): Dictionary#
YieldsDeprecated
Deprecated in favor of
AvatarEditorService:GetOutfitDetailsAsync(). This method has the
same behavior: it returns a table containing the outfit details for the
given outfit. See AvatarEditorService:GetOutfitDetailsAsync() for
the response format.
| Name | Type | Default | Description |
|---|---|---|---|
outfitId | int64 | The ID of the outfit whose details are being retrieved. |
Returns
Dictionary— A table containing the outfit info for the retrieved outfit. See above for a sample table.
GetOutfitDetailsAsync(outfitId: int64): Dictionary#
Yields
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
},
}| Name | Type | Default | Description |
|---|---|---|---|
outfitId | int64 | The ID of the outfit whose details are being retrieved. |
Returns
Dictionary— A table containing the outfit info for the retrieved outfit. See above for a sample table.
GetOutfits(outfitSource: OutfitSource = All, outfitType: OutfitType = All): OutfitPages#
YieldsDeprecated
Deprecated in favor of AvatarEditorService:GetOutfitsAsync(). This
method has the same behavior: it returns outfit data for the
Players.LocalPlayer. See
AvatarEditorService:GetOutfitsAsync() for the response format.
| Name | Type | Default | Description |
|---|---|---|---|
outfitSource | OutfitSource | All | An OutfitSource filter specifying which outfits to include.
Defaults to OutfitSource.All. |
outfitType | OutfitType | All | An OutfitType filter specifying the type of outfits to return.
Defaults to OutfitType.All. |
Returns
OutfitPages— AnOutfitPagesobject containing the outfit data for the local player.
GetOutfitsAsync(outfitSource: OutfitSource = All, outfitType: OutfitType = All): OutfitPages#
Yields
This function returns outfit data for the Players.LocalPlayer.
This would be used with
Players:GetHumanoidDescriptionFromOutfitIdAsync() to update the
players character to the outfit. Access to this would also depend on
AvatarEditorService:PromptAllowInventoryReadAccess() being
accepted by the user.
The returned table includes the following fields:
[
{
"Id": 0,
"Name": "string",
"IsEditable": true
}
]| Name | type | Description |
|---|---|---|
| id | int | |
| name | string | |
| isEditable | boolean |
| Name | Type | Default | Description |
|---|---|---|---|
outfitSource | OutfitSource | All | An OutfitSource filter specifying which outfits to include.
Defaults to OutfitSource.All. |
outfitType | OutfitType | All | An OutfitType filter specifying the type of outfits to return.
Defaults to OutfitType.All. |
Returns
OutfitPages— AnOutfitPagesobject containing the outfit data for the local player.
GetRecommendedAssets(assetType: AvatarAssetType, contextAssetId: int64 = 0): Array#
YieldsDeprecated
Deprecated in favor of
AvatarEditorService:GetRecommendedAssetsAsync(). This method has
the same behavior: it returns a list of recommended assets based on the
given AvatarAssetType and context asset ID. See
AvatarEditorService:GetRecommendedAssetsAsync() for the response
format.
| Name | Type | Default | Description |
|---|---|---|---|
assetType | AvatarAssetType | The type of asset recommendations to retrieve recommendations for.
Only affects the response when item based recommendations don't exist
for the given contextAssetId. | |
contextAssetId | int64 | 0 | The ID of an asset with a type matching the provided assetType used for context when retrieving recommendations. |
Returns
Array— A list of recommendations based on the givenAssetType.
GetRecommendedAssetsAsync(assetType: AvatarAssetType, contextAssetId: int64 = 0): Array#
Yields
Returns a list of recommended assets based on a given AssetType and
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
}
}
]| Name | Type | Default | Description |
|---|---|---|---|
assetType | AvatarAssetType | The type of asset recommendations to retrieve recommendations for.
Only affects the response when item based recommendations don't exist
for the given contextAssetId. | |
contextAssetId | int64 | 0 | The ID of an asset with a type matching the provided assetType used for context when retrieving recommendations. |
Returns
Array— A list of recommendations based on the givenAssetType.
GetRecommendedBundles(bundleId: int64): Array#
YieldsDeprecated
Deprecated in favor of
AvatarEditorService:GetRecommendedBundlesAsync(). This method has
the same behavior: it returns a list of recommended bundles for a given
bundle ID. See AvatarEditorService:GetRecommendedBundlesAsync()
for the response format.
| Name | Type | Default | Description |
|---|---|---|---|
bundleId | int64 | A list of recommended bundles. |
Returns
Array— The bundle ID that the recommended bundles will be returned for.
GetRecommendedBundlesAsync(bundleId: int64): Array#
Yields
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
}
}
}
]| Name | Type | Default | Description |
|---|---|---|---|
bundleId | int64 | A list of recommended bundles. |
Returns
Array— The bundle ID that the recommended bundles will be returned for.
PromptAllowInventoryReadAccess(): ()#
Prompts the Players.LocalPlayer to 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 use AvatarEditorService:GetInventoryAsync(),
AvatarEditorService:GetOutfitsAsync() and
AvatarEditorService:GetFavoriteAsync(). Permission does not
persist between sessions.
Returns
()
PromptCreateOutfit(outfit: HumanoidDescription, rigType: HumanoidRigType, outfitOptions: Dictionary = nil, outfitType: Variant): ()#
Prompts the Players.LocalPlayer to save the given
HumanoidDescription as an outfit. Does not yield. The result can
be retrieved by listening to the
AvatarEditorService.PromptCreateOutfitCompleted event.
| Name | Type | Default | Description |
|---|---|---|---|
outfit | HumanoidDescription | The Outfit that the player will be prompted to created. | |
rigType | HumanoidRigType | The HumanoidRigType that the outfit will be created for if the
player confirms the prompt. | |
outfitOptions | Dictionary | nil | Reserved for future options. Must be empty or omitted. |
outfitType | Variant | Optional OutfitType. Only Avatar and Makeup values are
accepted. When omitted, the type is inferred from the description. |
Returns
()
PromptDeleteOutfit(outfitId: int64): ()#
Prompts the Players.LocalPlayer to delete the given outfit. Does
not yield. The result can be retrieved by listening to the
AvatarEditorService.PromptDeleteOutfitCompleted event.
| Name | Type | Default | Description |
|---|---|---|---|
outfitId | int64 | The outfitId of the outfit to delete. |
Returns
()
PromptRenameOutfit(outfitId: int64): ()#
Prompts the Players.LocalPlayer to rename the given outfit. Does
not yield. The result can be retrieved by listening to the
AvatarEditorService.PromptRenameOutfitCompleted event.
| Name | Type | Default | Description |
|---|---|---|---|
outfitId | int64 | The outfitId of the outfit to rename. |
Returns
()
PromptSaveAvatar(humanoidDescription: HumanoidDescription, rigType: HumanoidRigType): ()#
This function prompts the Players.LocalPlayer to update their
avatar based on the given HumanoidDescription and
HumanoidRigType (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.
| Name | Type | Default | Description |
|---|---|---|---|
humanoidDescription | HumanoidDescription | The given HumanoidDescription being prompted to save. | |
rigType | HumanoidRigType | The HumanoidRigType that the avatar will be saved for if the
player confirms the prompt. |
Returns
()
PromptSetFavorite(itemId: int64, itemType: AvatarItemType, shouldFavorite: boolean): ()#
This function prompts the Players.LocalPlayer to favorite or
unfavorite the given asset or bundle.
| Name | Type | Default | Description |
|---|---|---|---|
itemId | int64 | The ItemId of the item being prompted to favorite. | |
itemType | AvatarItemType | The type of item being prompted to favorite. | |
shouldFavorite | boolean | Whether to favorite (true) or unfavorite (false) the item. |
Returns
()
PromptUpdateOutfit(outfitId: int64, updatedOutfit: HumanoidDescription, rigType: HumanoidRigType): ()#
Prompts the Players.LocalPlayer to update the given outfit with
the given HumanoidDescription.
| Name | Type | Default | Description |
|---|---|---|---|
outfitId | int64 | The outfitId of the outfit to update. | |
updatedOutfit | HumanoidDescription | A HumanoidDescription that represents the new outfit data. | |
rigType | HumanoidRigType | The HumanoidRigType to update the outfit to. |
Returns
()
SearchCatalog(searchParameters: CatalogSearchParams): CatalogPages#
YieldsDeprecated
Deprecated in favor of AvatarEditorService:SearchCatalogAsync().
This method has the same behavior: it returns a CatalogPages
object containing the result of the given search. See
AvatarEditorService:SearchCatalogAsync() for details on the
response format.
| Name | Type | Default | Description |
|---|---|---|---|
searchParameters | CatalogSearchParams | An object containing the parameters used for the search. |
Returns
CatalogPages— ACatalogPagesobject containing the search results.
SearchCatalogAsync(searchParameters: CatalogSearchParams): CatalogPages#
Yields
This function returns a CatalogPages object 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 TimedOptions field for assets that
support timed ownership.
Use SalesTypeFilter.TimedOptions in CatalogSearchParams
to filter results to only items with timed options available.
| Name | Type | Default | Description |
|---|---|---|---|
searchParameters | CatalogSearchParams | An object containing the parameters used for the search. |
Returns
CatalogPages— ACatalogPagesobject containing the search results.
Events 7#
| PromptAllowInventoryReadAccessCompleted | Fires when the
AvatarEditorService:PromptAllowInventoryReadAccess() prompt is
responded to by the user. |
| PromptCreateOutfitCompleted | Fires when the PromptSaveOutfit operation is completed. |
| PromptDeleteOutfitCompleted | Fires when the PromptDeleteOutfit operation is completed. |
| PromptRenameOutfitCompleted | Fires when the PromptRenameOutfit operation is completed. |
| PromptSaveAvatarCompleted | Fires when the AvatarEditorService:PromptSaveAvatar() operation is
completed. |
| PromptSetFavoriteCompleted | Fires when the AvatarEditorService:PromptSetFavorite() operation
is completed. |
| PromptUpdateOutfitCompleted | Fires when the AvatarEditorService:PromptUpdateOutfit() operation
is completed. |
PromptAllowInventoryReadAccessCompleted(result: AvatarPromptResult)#
This event fires when the
AvatarEditorService:PromptAllowInventoryReadAccess() prompt is
responded to by the user. It can only return the Success or
PermissionDenied enum statuses as it does not
perform any web requests which could fail.
| Name | Type | Default | Description |
|---|---|---|---|
result | AvatarPromptResult | The result of the prompt. |
PromptCreateOutfitCompleted(result: AvatarPromptResult, failureType: Variant)#
This event fires when the PromptSaveOutfit operation is completed. It
gives a status enum indicating whether the
prompt succeeded, failed or permission was not granted by the user.
| Name | Type | Default | Description |
|---|---|---|---|
result | AvatarPromptResult | The result of the prompt. | |
failureType | Variant | An CreateOutfitFailure value indicating the reason the outfit
creation failed, or nil on success. |
PromptDeleteOutfitCompleted(result: AvatarPromptResult)#
Fires when the PromptDeleteOutfit operation is completed. It gives a
status enum indicating whether the prompt
succeeded, failed or permission was not granted by the user.
| Name | Type | Default | Description |
|---|---|---|---|
result | AvatarPromptResult | The result of the prompt. |
PromptRenameOutfitCompleted(result: AvatarPromptResult)#
Fires when the PromptRenameOutfit operation is completed. It gives a
status enum indicating whether the prompt
succeeded, failed or permission was not granted by the user.
| Name | Type | Default | Description |
|---|---|---|---|
result | AvatarPromptResult | The result of the prompt. |
PromptSaveAvatarCompleted(result: AvatarPromptResult, humanoidDescription: HumanoidDescription)#
This event fires when the AvatarEditorService:PromptSaveAvatar()
operation is completed. It gives a status enum
indicating whether the prompt succeeded, failed or permission was not
granted by the user.
| Name | Type | Default | Description |
|---|---|---|---|
result | AvatarPromptResult | The result of the prompt. | |
humanoidDescription | HumanoidDescription | The HumanoidDescription that was saved (or attempted to be
saved) to the platform avatar. |
PromptSetFavoriteCompleted(result: AvatarPromptResult)#
Fires when the AvatarEditorService:PromptSetFavorite() operation
is completed. It gives a status enum indicating
whether the prompt succeeded, failed or permission was not granted by the
user.
| Name | Type | Default | Description |
|---|---|---|---|
result | AvatarPromptResult | The result of the prompt. |
PromptUpdateOutfitCompleted(result: AvatarPromptResult)#
Fires when the AvatarEditorService:PromptUpdateOutfit() operation
is completed. It gives a status enum indicating
whether the prompt succeeded, failed or permission was not granted by the
user.
| Name | Type | Default | Description |
|---|---|---|---|
result | AvatarPromptResult | The result of the prompt. |
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild