Avatar Editor Service
Avatar Editor Service
articles/roblox avatars|Avatars are a big part of players expressing themselves on Roblox. Using
AvatarEditorService along with an in-game avatar editor, you can let players customize their character and take it everywhere they go.
Reading Player Inventory
AvatarEditorService has various functions and events for working with items already in a player’s inventory.
To begin using inventory-related methods, you’ll need to prompt the player to allow access via
The player’s response can then be tracked by waiting for the
Once access is granted by the player, you can read their inventory with the
AvatarEditorService/GetInventory|GetInventory() function, supplying an array of
enum/AvatarAssetType|AvatarAssetTypes to gather. This function returns an
InventoryPages object containing the player’s owned items.
Searching the Catalog
AvatarEditorService includes functions and events which let you search the Roblox catalog. To begin, construct a
datatype/CatalogSearchParams object and supply the desired properties:
With a valid
AvatarEditorService/SearchCatalog|SearchCatalog(). This function returns a
CatalogPages object containing the results.
Saving Avatars and Outfits
When used alongside an in-game avatar editor,
AvatarEditorService is ideal for saving avatars/outfits to the Roblox platform.
Saving as Avatar
HumanoidDescription can be saved to the player’s current avatar with
AvatarEditorService/PromptSaveAvatar|PromptSaveAvatar(). This may include:
- Pre-defined avatar configurations that you’ve built using existing catalog items.
- Any configuration that the player has chosen through an in-game avatar editor.
AvatarEditorService/PromptSaveAvatar|PromptSaveAvatar() does not yield and you can get the result by listening to the
Saving as Outfit
To save any
HumanoidDescription as an outfit (without overwriting the player’s current avatar), use
Once called, you can get the result of
AvatarEditorService/PromptCreateOutfit|PromptCreateOutfit() by listening to the
Handling Item Purchases
When saving either an avatar or an outfit that uses catalog items, the player will not receive any items that they do not own. Thus, before calling either
AvatarEditorService/PromptCreateOutfit|PromptCreateOutfit(), the recommended workflow is:
- Determine if the player does not own any items they’re trying to save via
- For non-owned items, give the player an option to purchase them using
AvatarEditorService/PromptSetFavorite|PromptSetFavorite(). However, you will not earn any Robux if the player decides to purchase those items outside of your game.