The Developer Hub is now deprecated and information on this page may no longer be accurate. Instead, you should go to our new and improved documentation. You can also learn more about the future of documentation.
Collapse Sidebar


The AddAccessory function attaches the specified Accessory to the Humanoid|Humanoid’s parent.

How are Accessories attached to Humanoids?

When this function is called, the Accessory is parented to the Humanoid|Humanoid’s parent and then attached.

An 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.


Name Type Default Description

The Accessory to be attached


Return Type Summary

No return

Code Samples

[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 StarterPlayer’s StarterCharacterScripts folder.