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


BuildRigFromAttachments assembles a tree of Motor6D joints for a Humanoid. Motor6D joints are required for the playback of Animation|Animations

Starting from the humanoid’s Humanoid/RootPart, the function collects all Attachments parented in the current part, whose name ends with “RigAttachment”. It then searches for a matching attachment in the character that shares the same name as the attachment. Using those two attachments, a Motor6D joint is generated based on the parts associated with the two attachments, and the Attachment/CFrames of the attachments.

See the provided code sample below to see how this function works.


Return Type Summary

Code Samples

R15 Package Importer

A script that generates an R15 character from scratch using a package’s assetId.

Lua Port of BuildRigFromAttachments

A Lua port of the Humanoid’s BuildRigFromAttachments function, so that the recursive behavior of the function can be seen.