Roblox UtilitiesDevlHub Roblox Documentation

Class

AvatarEditorService

NotCreatableService
Inherits
Instance › Object
Memory category
Instances

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:

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:

Luau
{
  "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#

CheckApplyDefaultClothingUsed to apply default clothing to the HumanoidDescription if necessary.Yields
CheckApplyDefaultClothingAsyncUsed to apply default clothing to the HumanoidDescription if necessary.Yields
ConformToAvatarRulesDeprecated. Returns a copy of the given HumanoidDescription that conforms to the platform Avatar rules.Yields
ConformToAvatarRulesAsyncReturns a copy of the given HumanoidDescription that conforms to the platform Avatar rules.Yields
GetAccessoryTypeReturns the AccessoryType that corresponds to the given AvatarAssetType.
GetAvatarRulesReturns the platform Avatar rules for things such as scaling, default shirts and pants, number of wearable assets.Yields
GetAvatarRulesAsyncReturns the platform Avatar rules for things such as scaling, default shirts and pants, number of wearable assets.Yields
GetBatchItemDetailsGets the item details for a list of items at once.Yields
GetBatchItemDetailsAsyncGets the item details for a list of items at once.Yields
GetBundlesByAssetIdAsyncReturns a CatalogPages object containing bundles that include the given asset.Yields
GetFavoriteReturns if the Players.LocalPlayer has favorited the given bundle or asset.Yields
GetFavoriteAsyncReturns if the Players.LocalPlayer has favorited the given bundle or asset.Yields
GetHeadShapesAsyncReturns an array of head shape names that the Players.LocalPlayer owns.Yields
GetInventoryReturns an InventoryPages object with information about owned items in the users inventory with the given AvatarAssetTypes.Yields
GetInventoryAsyncReturns an InventoryPages object with information about owned items in the users inventory with the given AvatarAssetTypes.Yields
GetItemDetailsReturns the item details for the given item.Yields
GetItemDetailsAsyncReturns the item details for the given item.Yields
GetOutfitDetailsReturns the outfit details for the given outfit.Yields
GetOutfitDetailsAsyncReturns the outfit details for the given outfit.Yields
GetOutfitsReturns outfit data for the Players.LocalPlayer.Yields
GetOutfitsAsyncReturns outfit data for the Players.LocalPlayer.Yields
GetRecommendedAssetsReturns a list of recommended assets based on a given AssetType and asset ID.Yields
GetRecommendedAssetsAsyncReturns a list of recommended assets based on a given AssetType and asset ID.Yields
GetRecommendedBundlesReturns a list of recommended bundles for a given bundle id.Yields
GetRecommendedBundlesAsyncReturns a list of recommended bundles for a given bundle id.Yields
PromptAllowInventoryReadAccessPrompts the Players.LocalPlayer to allow the developer to read what items the user has in their inventory and other avatar editor related information.
PromptCreateOutfitPrompts the Players.LocalPlayer to save the given HumanoidDescription as an outfit.
PromptDeleteOutfitPrompts the Players.LocalPlayer to delete the given outfit.
PromptRenameOutfitPrompts the Players.LocalPlayer to rename the given outfit.
PromptSaveAvatarPrompts the Players.LocalPlayer to update their avatar based on the given HumanoidDescription and HumanoidRigType of R6 or R15.
PromptSetFavoritePrompts the Players.LocalPlayer to favorite or unfavorite the given asset or bundle.
PromptUpdateOutfitPrompts the Players.LocalPlayer to update the given outfit.
SearchCatalogReturns a CatalogPages object containing the result of the given search.Yields
SearchCatalogAsyncReturns 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.

NameTypeDefaultDescription
humanoidDescriptionHumanoidDescriptionThe HumanoidDescription to check if default clothing is required.
Returns
  • HumanoidDescription — Returns a HumanoidDescription if default clothing was necessary. Otherwise returns nil.

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.

NameTypeDefaultDescription
humanoidDescriptionHumanoidDescriptionThe HumanoidDescription to check if default clothing is required.
Returns
  • HumanoidDescription — Returns a HumanoidDescription if default clothing was necessary. Otherwise returns nil.

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.

NameTypeDefaultDescription
humanoidDescriptionHumanoidDescriptionThe HumanoidDescription to conform to the platform Avatar rules.
Returns

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.

NameTypeDefaultDescription
humanoidDescriptionHumanoidDescriptionThe HumanoidDescription to conform.
Returns

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.

NameTypeDefaultDescription
avatarAssetTypeAvatarAssetTypeThe AvatarAssetType to convert to its corresponding AccessoryType.
Returns

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:

Luau
{
  "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.

NameTypeDefaultDescription
itemIdsArrayThe list of item ids to get details of.
itemTypeAvatarItemTypeThe type of the item ids provided.
Returns

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.

NameTypeDefaultDescription
itemIdsArrayThe list of item ids to get details of.
itemTypeAvatarItemTypeThe 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).

NameTypeDefaultDescription
assetIdint64The ID of the asset to find bundles for.
limitint6410The number of results per page. Accepts 10, 25, 50, and 100.
Returns

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.

NameTypeDefaultDescription
itemIdint64The ID of the specified asset or bundle.
itemTypeAvatarItemTypeThe AvatarItemType of the specified asset or bundle.
Returns
  • boolean — Whether the LocalPlayer has 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.

NameTypeDefaultDescription
itemIdint64The ID of the specified asset or bundle.
itemTypeAvatarItemTypeThe AvatarItemType of the specified asset or bundle.
Returns
  • boolean — Whether the LocalPlayer has 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 by Players.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.

NameTypeDefaultDescription
assetTypesArrayThe AvatarAssetType that can will be checked for in the player's inventory.
Returns

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:

Luau
[
    {
      "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.
NameTypeDefaultDescription
assetTypesArrayThe AvatarAssetType that can will be checked for in the player's inventory.
Returns

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.

NameTypeDefaultDescription
itemIdint64The ID of the item whose details are being retrieved.
itemTypeAvatarItemTypeAn 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.
NameTypeDefaultDescription
itemIdint64The ID of the item whose details are being retrieved.
itemTypeAvatarItemTypeAn 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.

NameTypeDefaultDescription
outfitIdint64The 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:

Luau
{
  "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
  },
}
NameTypeDefaultDescription
outfitIdint64The 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.

NameTypeDefaultDescription
outfitSourceOutfitSourceAllAn OutfitSource filter specifying which outfits to include. Defaults to OutfitSource.All.
outfitTypeOutfitTypeAllAn OutfitType filter specifying the type of outfits to return. Defaults to OutfitType.All.
Returns

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:

Luau
[
    {
      "Id": 0,
      "Name": "string",
      "IsEditable": true
    }
]
Name type Description
id int
name string
isEditable boolean
NameTypeDefaultDescription
outfitSourceOutfitSourceAllAn OutfitSource filter specifying which outfits to include. Defaults to OutfitSource.All.
outfitTypeOutfitTypeAllAn OutfitType filter specifying the type of outfits to return. Defaults to OutfitType.All.
Returns

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.

NameTypeDefaultDescription
assetTypeAvatarAssetTypeThe type of asset recommendations to retrieve recommendations for. Only affects the response when item based recommendations don't exist for the given contextAssetId.
contextAssetIdint640The 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 given AssetType.

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:

Luau
[
    {
      "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
      }
    }
]
NameTypeDefaultDescription
assetTypeAvatarAssetTypeThe type of asset recommendations to retrieve recommendations for. Only affects the response when item based recommendations don't exist for the given contextAssetId.
contextAssetIdint640The 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 given AssetType.

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.

NameTypeDefaultDescription
bundleIdint64A 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:

Luau
[
    {
      "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
        }
      }
    }
]
NameTypeDefaultDescription
bundleIdint64A 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.

NameTypeDefaultDescription
outfitHumanoidDescriptionThe Outfit that the player will be prompted to created.
rigTypeHumanoidRigTypeThe HumanoidRigType that the outfit will be created for if the player confirms the prompt.
outfitOptionsDictionarynilReserved for future options. Must be empty or omitted.
outfitTypeVariantOptional 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.

NameTypeDefaultDescription
outfitIdint64The 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.

NameTypeDefaultDescription
outfitIdint64The 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.

NameTypeDefaultDescription
humanoidDescriptionHumanoidDescriptionThe given HumanoidDescription being prompted to save.
rigTypeHumanoidRigTypeThe 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.

NameTypeDefaultDescription
itemIdint64The ItemId of the item being prompted to favorite.
itemTypeAvatarItemTypeThe type of item being prompted to favorite.
shouldFavoritebooleanWhether 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.

NameTypeDefaultDescription
outfitIdint64The outfitId of the outfit to update.
updatedOutfitHumanoidDescriptionA HumanoidDescription that represents the new outfit data.
rigTypeHumanoidRigTypeThe 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.

NameTypeDefaultDescription
searchParametersCatalogSearchParamsAn object containing the parameters used for the search.
Returns

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.

NameTypeDefaultDescription
searchParametersCatalogSearchParamsAn object containing the parameters used for the search.
Returns

Events 7#

PromptAllowInventoryReadAccessCompletedFires when the AvatarEditorService:PromptAllowInventoryReadAccess() prompt is responded to by the user.
PromptCreateOutfitCompletedFires when the PromptSaveOutfit operation is completed.
PromptDeleteOutfitCompletedFires when the PromptDeleteOutfit operation is completed.
PromptRenameOutfitCompletedFires when the PromptRenameOutfit operation is completed.
PromptSaveAvatarCompletedFires when the AvatarEditorService:PromptSaveAvatar() operation is completed.
PromptSetFavoriteCompletedFires when the AvatarEditorService:PromptSetFavorite() operation is completed.
PromptUpdateOutfitCompletedFires 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.

NameTypeDefaultDescription
resultAvatarPromptResultThe 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.

NameTypeDefaultDescription
resultAvatarPromptResultThe result of the prompt.
failureTypeVariantAn 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.

NameTypeDefaultDescription
resultAvatarPromptResultThe 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.

NameTypeDefaultDescription
resultAvatarPromptResultThe 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.

NameTypeDefaultDescription
resultAvatarPromptResultThe result of the prompt.
humanoidDescriptionHumanoidDescriptionThe 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.

NameTypeDefaultDescription
resultAvatarPromptResultThe 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.

NameTypeDefaultDescription
resultAvatarPromptResultThe result of the prompt.

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed