Collapse Sidebar




Points to the Model's primary part. The part is the BasePart that is used as a basis when positioning the model using the Model/MoveTo and Model/SetPrimaryPartCFrame functions.

Note when assigning the PrimaryPart that the part must be a BasePart that is descendant of the Model. If this is not the case, the PrimaryPart will be set to nil in Roblox studio, or produce an error if done so by a Script.

When dealing with models full of unanchored parts connected with joints such as Welds or Motor6Ds it is best practice to set the PrimaryPart to the root part of the assembly. Giving the example of a Player Character, this is the HumanoidRootPart.

Code Samples


In this code sample a Model is created with a simple arrangement of Parts. The PrimaryPart of this Model is then set, meaning Model:SetPrimaryPartCFrame can then be used.

To demonstrate SetPrimaryPartCFrame, a simple loop is then run which switches the model between two CFrames every second.