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.
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.
|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.
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.
Content streaming dynamically loads and unloads Models on a player's device as their character explores the 3D world. With streaming enabled, you can specify the way each model should be treated under streaming behavior. For example, a model set to Persistent will never stream out, or a model set to Atomic will stream in and out as a single unit with all of its descendants.
Because 3D content that exists on the client changes dynamically in a streaming-enabled experience, models may suddenly disappear. To alleviate this, you can set specific models to render as lower resolution "imposter" meshes when streamed out, as detailed in Model Level of Detail.
See Model Streaming Controls for more on model-level streaming controls.