HumanoidDescription
HumanoidDescription is an object that stores a description of a Humanoid for R6 and R15 rigs. It can be applied in order to set a rig's scaling, clothing (Shirt, Pants, ShirtGraphic), Accessories, Animations and BodyColors.
You can get a HumanoidDescription by using the following functions:
- Players:GetHumanoidDescriptionFromUserId(), for an outfit currently being worn by a user on Roblox.
- Players:GetHumanoidDescriptionFromOutfitId(), for an outfit created by a user on Roblox.
- You can create a Humanoid rig model from a HumanoidDescription through Players:CreateHumanoidModelFromDescription().
See also:
- HumanoidDescription System, for more information on HumanoidDescription.
Summary
Properties
A JSON formatted array of Layered clothing where each table in the entry in the array describes an accessory's AssetId, AccessoryType, Order, and (optionally) Puffiness as key-value pairs.
A comma-separated list of asset IDs that will be added as Accessories to a Humanoid rig when applied, usually those attached to its back (such as capes).
Determines the factor by which the shape of a Humanoid is interpolated from the standard R15 body shape (0) to a taller and more slender body type (1).
When this description is applied to a Humanoid, this determines the Animation.AnimationId to play when its state is Climbing.
Determines by what factor the depth (back-to-front distance) of a Humanoid is scaled.
Determines the asset ID of the Face to be applied to the Humanoid.
A comma-separated list of asset IDs that will be added as Accessories to a Humanoid rig when applied, usually those attached to the front of its face (such as glasses).
When this description is applied to a Humanoid, this determines the Animation.AnimationId to play when its state is Freefall.
A comma-separated list of asset IDs that will be added as Accessories to a Humanoid rig when applied, usually those attached to front of its torso (such as medals or ties).
Determines the Graphic used by a ShirtGraphic.
A comma-separated list of asset IDs that will be added as Accessories to a Humanoid rig when applied, usually those attached to its head resembling hair.
A comma-separated list of asset IDs that will be added as Accessories to a Humanoid rig when applied, usually those attached to its head.
Determines the asset ID of the Head to be applied to the Humanoid.
Determines the BodyColors.HeadColor3 and BodyColors.HeadColor of a Humanoid when applied.
Determines by what factor the Head object of a Humanoid is scaled, as well as any accessories attached to it.
Determines by what factor the height (top-to-bottom distance) of a Humanoid is scaled, as well as all accessories not attached to its head.
When this description is applied to a Humanoid, this determines the Animation.AnimationId to play when its state is Running at a speed near zero.
When this description is applied to a Humanoid, this determines the Animation.AnimationId to play when its state is Jumping.
Determines the asset ID of the LeftArm to be applied to the Humanoid.
Determines the BodyColors.LeftArmColor3 and BodyColors.LeftArmColor of a Humanoid when applied.
Determines the asset ID of the LeftLeg to be applied to the Humanoid.
Determines the BodyColors.LeftLegColor3 and BodyColors.LeftLegColor of a Humanoid when applied.
A comma-separated list of asset IDs that will be added as Accessories to a Humanoid rig when applied, usually those attached to its neck (such as scarves or necklaces).
Determines the PantsTemplate used by a Pants instance.
Determines how wide (0) or narrow (1) a Humanoid rig is.
Determines the asset ID of the RightArm to be applied to the Humanoid.
Determines the BodyColors.RightArmColor3 and BodyColors.RightArmColor of a Humanoid when applied.
Determines the asset ID of the RightLeg to be applied to the Humanoid.
Determines the BodyColors.RightLegColor3 and BodyColors.RightLegColor of a Humanoid when applied.
When this description is applied to a Humanoid, this determines the Animation.AnimationId to play when its state is Running at a moderate speed.
Determines the ShirtTemplate used by a Shirt instance.
A comma-separated list of asset IDs that will be added as Accessories to a Humanoid rig when applied, usually those attached to its shoulders (such as shoulder-mounted critters).
When this description is applied to a Humanoid, this determines the Animation.AnimationId to play when its state is Swimming.
Determines the asset ID of the Torso to be applied to the Humanoid.
Determines the BodyColors.TorsoColor3 and BodyColors.TorsoColor of a Humanoid when applied.
A comma-separated list of asset IDs that will be added as Accessories to a Humanoid rig when applied, usually those attached to its waist (such as belts).
When this description is applied to a Humanoid, this determines the Animation.AnimationId to play when its state is Running at a low speed.
Determines by what factor the width (left-to-right distance) of a Humanoid is scaled, as well as all accessories not attached to its head.
Methods
Adds the emote to the description given a name and its asset ID.
Returns a table of an avatar's current accessories.
Returns a dictionary of emotes that have been added or set to this description.
Returns an array of tables describing the equipped emotes that have been set.
Removes any emotes that have been added under the given name.
Accepts a table that sets the accessories and related properties for an avatar.
Sets all of the emotes on this description.
Sets the currently equipped emotes given an array of emote names.
Events
Fires when emotes are added, removed or set on this description.
Fires when the equipped emotes are set on this description.
Properties
AccessoryBlob
BackAccessory
BodyTypeScale
ClimbAnimation
DepthScale
Face
FaceAccessory
FallAnimation
FrontAccessory
GraphicTShirt
HairAccessory
HatAccessory
Head
HeadColor
HeadScale
HeightScale
IdleAnimation
JumpAnimation
LeftArm
LeftArmColor
LeftLeg
LeftLegColor
MoodAnimation
NeckAccessory
Pants
ProportionScale
RightArm
RightArmColor
RightLeg
RightLegColor
RunAnimation
Shirt
ShouldersAccessory
SwimAnimation
Torso
TorsoColor
WaistAccessory
WalkAnimation
WidthScale
Methods
GetAccessories
Parameters
Returns
Code Samples
local includeRigidAccessories = true
local accessoriesTable =
game:GetService("Players"):GetHumanoidDescriptionFromUserId(1):GetAccessories(includeRigidAccessories)
for _, accessoryInfo in ipairs(accessoriesTable) do
print(tostring(accessoryInfo.AssetId) .. " " .. tostring(accessoryInfo.AccessoryType))
end
SetAccessories
Parameters
Returns
Code Samples
local humanoidDescription = Instance.new("HumanoidDescription")
local originalSpecifications = {
{
Order = 1,
AssetId = 123456789,
Puffiness = 0.5,
AccessoryType = Enum.AccessoryType.Sweater,
},
}
humanoidDescription:SetAccessories(originalSpecifications)
local updatedSpecifications = humanoidDescription:GetAccessories(false)
local newIndividualSpecification = {
Order = 2,
AssetId = 987654321,
Puffiness = 0.7,
AccessoryType = Enum.AccessoryType.Jacket,
IsLayered = true,
}
updatedSpecifications[#updatedSpecifications + 1] = newIndividualSpecification
humanoidDescription:SetAccessories(updatedSpecifications)