Class
BodyPartDescription
Describes the appearance of an avatar body part for the
HumanoidDescription.
BodyPartDescription is an object that stores the description for an
avatar's body parts, such as the Color. It
is meant to be placed underneath a HumanoidDescription in order to
work with Humanoid:ApplyDescriptionAsync().
Properties 5#
AssetIdint64 | The asset ID that should be applied when applying this
BodyPartDescription.ReadSafe |
BodyPartBodyPart | The type of body part.ReadSafe |
ColorColor3 | The Color3 for this body part.ReadSafe |
HeadShapestring | Specifies the head shape identifier to apply to a Dynamic Head when this
BodyPartDescription is applied.ReadSafe |
InstanceInstance | A reference to the Instance that should be applied when applying
this BodyPartDescription.ReadSafe |
AssetId: int64#
ReadSafe
The asset ID that should be applied when applying this
BodyPartDescription.
BodyPart: BodyPart#
ReadSafe
The type of body part.
Color: Color3#
ReadSafe
The Color3 for this body part.
HeadShape: string#
ReadSafe
HeadShape specifies a Classic Head shape identifier to apply to a
compatible Dynamic Head. This property is only relevant when
BodyPart is set to
Head and AssetId
references a Dynamic Head that supports head shapes.
Example#
local AvatarEditorService = game:GetService("AvatarEditorService")
-- Get available head shapes for the user
local headShapes = AvatarEditorService:GetHeadShapesAsync(userId)
-- Create a BodyPartDescription for a Dynamic Head with a Classic shape
local bodyPartDescription = Instance.new("BodyPartDescription")
bodyPartDescription.BodyPart = Enum.BodyPart.Head
bodyPartDescription.AssetId = dynamicHeadAssetId
bodyPartDescription.HeadShape = headShapes[1] -- Apply the first owned head shape
bodyPartDescription.Parent = humanoidDescription
-- Apply the description
humanoid:ApplyDescriptionAsync(humanoidDescription)See also:
AvatarEditorService:GetHeadShapesAsync(), which returns head shape identifiers that can be used with this propertyAssetId, which specifies the Dynamic Head asset to apply the shape toBodyPart, which must be set toHeadfor this property to have effectHumanoid:ApplyDescriptionAsync(), which applies the description containing thisBodyPartDescription
Instance: Instance#
ReadSafe
A reference to the Instance that should be applied when applying
this BodyPartDescription. This property can be used instead of
AssetId to apply accessories without
uploading them to the platform. This can reference either a body part with
R15, R15ArtistIntent and R6 folders, or only reference a single
subfolder.
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