The AddAccessory function attaches the specified
Accessory to the
How are Accessories attached to Humanoids?
When this function is called, the
Accessory is parented to the
Humanoid|Humanoid’s parent and then attached.
Accessory is attached to the character by searching for an
Attachment in the
Humanoid|Humanoid's parent that shares the same name as an
Attachment in the accessory’s Handle
Part. If one is found, the Handle part will be connected to the parent of the
Attachment using a
Weld. This weld will be configured so the
Attachment|Attachments occupy the same space.
If the required
Attachment can not be found, then the
Accessory will remain parented to the
Humanoid|Humanoid's parent but it will be unattached.
[Humanoid] AddAccessory Example
This script generates the “Clockwork’s Shades” Accessory from scratch, and then attaches it to the player’s character using
Humanoid.AddAccessory You should paste this code into a regular script, and then parent it inside of the