PcoWSkbVqDnWTu_dm2ix
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

RemoveAccessories

This function removes all Accessory|Accessories worn by the Humanoid|Humanoid’s parent. When this function is called, all Accessory|Accessories sharing an Instance/Parent with the Humanoid will be removed. For Player Player/Character|Characters this will remove all hats and other accessories.

This function removes Accessory|Accessories by calling Instance/Destroy on them. This means the Instance/Parent|Parents of the accessories are set to nil and locked.

See also

  • To attach an Accessory use the Humanoid/AddAccessory function
  • To get all Accessory|Accessories belonging to a Humanoid use the Humanoid/GetAccessories function

Returns

Return Type Summary

Code Samples


Remove and Return Hats

This code sample will remove all the hats from a Player/Character once the character has fully loaded. After five seconds, if the character still exists and is alive, it will return them.