SetAccessories
Unsafe
For thread safety, this property is not safe to read in an unsynchronized thread.
Accepts a table that sets the accessories and related properties for an avatar. If the second parameter (includeRigidAccessories) is true, then this function can also be used to set the rigid accessories in the rigid accessory properties. In this case any table entry that does not have an Order will be considered a rigid accessory and put in the appropriate property according to the AccessoryType.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
|
|
|||
|
|
Returns
| Return Type | Summary |
|---|---|
Code Samples
local humanoidDescription = Instance.new("HumanoidDescription")
local originalSpecifications = {
{
Order = 1,
AssetId = 123456789,
Puffiness = 0.5,
AccessoryType = Enum.AccessoryType.Sweater
},
{
Order = 1,
AssetId = 444446667,
Puffiness = 0.5,
AccessoryType = Enum.AccessoryType.Sweater
}
}
humanoidDescription:SetAccessories(originalSpecifications, false)
local updatedSpecifications = humanoidDescription:GetAccessories(false)
local newIndividualSpecification = {
Order = 2,
AssetId = 987654321,
Puffiness= 0.7,
AccessoryType = Enum.AccessoryType.Jacket
}
updatedSpecifications[#updatedSpecifications + 1] = newIndividualSpecification
humanoidDescription:SetAccessories(updatedSpecifications, false)