PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

GetCharacterAppearanceInfoAsync

This function returns information about a player’s avatar (ignoring gear) on the Roblox website in the form of a dictionary. It is not to be confused with Players/GetCharacterAppearanceAsync|GetCharacterAppearanceAsync, which actually loads the assets described by this method. You can use InsertService/LoadAsset to load the assets that are used in the player’s avatar. The structure of the returned dictionary is as follows:

Name Type Description
bodyColorstable (see below)Describes the BrickColor values for each limb
assetstable (see below)Describes the equipped assets (hats, body parts, etc)
defaultPantsAppliedboolDescribes whether default pants are applied
defaultShirtAppliedboolDescribes whether default shirt is applied
playerAvatarTypestringEither "R15" or "R6"
scalestable (see below)Describes various body scaling factors

Assets sub-table

The assets table is an array of tables containing the following keys that describe the assets currently equipped by the player:

Name Type Description
idnumberThe asset ID of the equipped asset
assetTypetableA table with name and id fields, each describing the kind of asset equipped ("Hat", "Face", etc.)
namestringThe name of the equipped asset

Scales sub-table

The scales table has the following keys, each a number corresponding to one Humanoid scaling property:
bodyType, head, height, proportion, depth, width

Body Colors sub-table

The body colors table has the following keys, each a number corresponding to a DataType/BrickColor ID number which can be used with BrickColor.new(id):
leftArmColorId, torsoColorId, rightArmColorId, headColorId, leftLegColorId, rightLegColorId

Parameters

Name Type Default Description

The *userId of the specified player.

Returns

Return Type Summary

A dictionary containing information about the character appearance of a given user.


Code Samples


Example Return Character Appearance Dictionary

Sometimes it is best to see an example of the returned dictionary structure in pure Lua. Here is one such example of a player whose avatar uses a package and wears several hats. Can you guess who it is?

local t = {
	playerAvatarType = "R15",
	defaultPantsApplied = false,
	defaultShirtApplied = false,
	scales = {
		bodyType = 0,
		head = 1,
		height = 1.05,
		proportion = 0,
		depth = 0.92,
		width = 0.85
	},
	bodyColors = {
		leftArmColorId = 1030,
		torsoColorId = 1001,
		rightArmColorId = 1030,
		headColorId = 1030,
		leftLegColorId = 1001,
		rightLegColorId = 1001
	},
	assets = {
		{
			id = 1031492,
			assetType = {
				name = "Hat",
				id = 8
			},
			name = "Striped Hat"
		},
		{
			id = 13062491,
			assetType = {
				name = "Face Accessory",
				id = 42
			},
			name = "Vision Française "
		},
		{
			id = 16598440,
			assetType = {
				name = "Neck Accessory",
				id = 43
			},
			name = "Red Bow Tie"
		},
		{
			id = 28999228,
			assetType = {
				name = "Face",
				id = 18
			},
			name = "Joyous Surprise"
		},
		{
			id = 86896488,
			assetType = {
				name = "Shirt",
				id = 11
			},
			name = "Expensive Red Tuxedo Jacket"
		},
		{
			id = 86896502,
			assetType = {
				name = "Pants",
				id = 12
			},
			name = "Expensive Red Tuxedo Pants"
		},
		{
			id = 376530220,
			assetType = {
				name = "Left Arm",
				id = 29
			},
			name = "ROBLOX Boy Left Arm"
		},
		{
			id = 376531012,
			assetType = {
				name = "Right Arm",
				id = 28
			},
			name = "ROBLOX Boy Right Arm"
		},
		{
			id = 376531300,
			assetType = {
				name = "Left Leg",
				id = 30
			},
			name = "ROBLOX Boy Left Leg"
		},
		{
			id = 376531703,
			assetType = {
				name = "Right Leg",
				id = 31
			},
			name = "ROBLOX Boy Right Leg"
		},
		{
			id = 376532000,
			assetType = {
				name = "Torso",
				id = 27
			},
			name = "ROBLOX Boy Torso"
		}
	}
}