Models are containers for physical objects, such as parts, welds, and joints that you can use to organize your workspace and group your assets. While models can often contain connected parts, known as an assembly, models can contain any number of individual parts and other objects, such as scripts, and attachments.
Characters, such as avatars or NPCs, are a single Model containing the appropriate humanoid parts, joints, and additional components:
When you group objects together, they automatically become a Model object.
In the 3D viewport or the Explorer window, select every object that you want to group into a model.
Right-click on one of the objects and select Group, or press CtrlG on Windows or ⌘G on macOS. A new Model object displays with all of the objects that make up the model nested underneath.
Setting a Primary Part
If you have a model with parts that are joined together through physical joints like WeldConstraints or Motor6Ds, you should specify a BasePart within the model to become a PrimaryPart. A model's PrimaryPart is the physical reference that specifies which BasePart the pivot point and bounding box should move with when the model changes position or orientation.
To set a primary part:
- In the Explorer window, select a model.
- In the Properties window, select the PrimaryPart property. Your cursor changes.
As you hover over models in the viewport, they are outlined to indicate their potential selection. You can select an outlined model by clicking it, or you can select multiple models by holding Shift, Ctrl, or ⌘ as you hover over and click them.
As models typically contain multiple child parts or meshes, some children may be hidden from view. To select a specific child without moving the camera around or locating the child in the Explorer hierarchy, click while holding Alt on Windows or ⌥ on macOS to perform selection cycling.
You can move, scale, or rotate a model using the Studio transform tools within the Home and Model tabs. Unless you've set a primary part, a model transforms based on the center of its bounding box.
Additionally, within a Script or LocalScript, you can move or rotate a model through the following methods:
|MoveTo()||Moves the model's PrimaryPart to the given position. If a primary part has not been specified, the root part of the model will be used.|
|PivotTo()||Transforms the model along with all of its descendant PVInstances such that the pivot is located at the specified CFrame.|
|TranslateBy()||Shifts a model by the given Vector3 offset, preserving the model's orientation.|
While models act similarly to Folder objects for most purposes in your experience, they also exhibit some unique behaviors.
When a Humanoid is present inside a model that contains a Part named Head, Roblox displays a name and/or health bar above that part. For more information, see Character Name/Health Display.
To prevent parts that have fallen off of an experience's map from continuing to fall forever, Studio automatically destroys parts that fall below the Workspace.FallenPartsDestroyHeight value. If a part destroyed due to this behavior is the last part in a model, then that model will also be destroyed.