Model
Model : PVInstance
Overview
A Model is a container that groups multiple objects for management, which is mainly used to handle collections of BaseParts.
It is deal for grouping parts that are related in position or structure. If you want to group elements that do not have a physical form, such as scripts, using a Folder is more appropriate.
It supports applying physical effects collectively to the grouped objects, while allowing operations such as moving, rotating, or deleting them. This enables treating multiple objects as a single unit without controlling each one individually.
Properties
PrimaryPart
BasePart
This property designates the BasePart that serves as the reference for the model.
The target designated as the PrimaryPart must be a BasePart that is child of the model. A BasePart that is not a child cannot be assigned.
For a Character Model, the PrimaryPart is the HumanoidRootPart.
Code Samples
local Model = script.Parent
Model.PrimaryPart = Model.PartWorldPivot
CFrame
Currently not supported.
Code Samples
Methods
BreakJoints
Currently not supported.
Parameters
Return
void
Code Samples
MoveTo
Moves all BaseParts within a Model instantly to a specified target position, based on the Model’s current pivot, regardless of whether the parts are Anchored. If there are obstacles such as other BaseParts at the target position, the Model automatically adjusts upward to avoid overlapping.
Since MoveTo only affects position, the Model’s rotation remains unchanged even after reaching the target position.
Parameters
Vector3 InPosition
The coordinates of the target position to move to.
Return
void
Code Samples
u
local Model = Instance.new('Model')
local Destination = Vector3.new(100, 0, 100)
Model:MoveTo(Destination)PivotTo
Currently not supported.
Parameters
CFrame InTargetCFrame
Return
void
Code Samples
SetPrimaryPartCFrame
Currently not supported.
Parameters
CFrame InNewCFrame
Return
void
Code Samples
Events
Last updated