Open Asterune
Model

Model

Groups instances for movement, cloning, and destruction.

Creatable
Instance.new("Model")
Inherits
PVInstanceInstance
Replication
Standard

Behavior

Model groups instances and supports a shared pivot. PivotTo moves descendant parts together. The pivot uses PrimaryPart when set, or model bounds otherwise. Pivot operations require model contents.

Summary

Members14
Properties4
Methods10

Properties

LevelOfDetail

The policy for reducing rendering detail at a distance.

PrimaryPart

Model.PrimaryPart: BasePart? = nil

The optional descendant part used as the model pivot reference. Assigning a non-descendant produces an error. Without a primary part, the pivot derives from model bounds and the pivot offset.

VisibilityRange

Model.VisibilityRange: number = 0

The distance limit used to cull the Model.

WorldPivot

Model.WorldPivot: CFrame = CFrame.new(0, 0, 0)

The model pivot in world space. Assignment changes the pivot offset without moving the model parts. A model without usable contents produces an error.

Methods

GetBoundingBox

Model:GetBoundingBox(): (CFrame, Vector3)

Returns the Model's bounding transform and dimensions.

GetExecutionGroup

Model:GetExecutionGroup(): ExecutionGroup?

Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.

GetExtentsSize

Model:GetExtentsSize(): Vector3

Returns the dimensions of the Model's bounds.

GetPivot

Model:GetPivot(): CFrame

Returns the current pivot as a CFrame. Uses PrimaryPart when assigned, otherwise model bounds, with the pivot offset applied. A model without usable contents produces an error.

GetRigJoints

Model:GetRigJoints(): { RigJointInfo }

Returns the rig-joint information for the Model.

GetScale

Model:GetScale(): number

Returns the current scale factor relative to the original model size. A value of 1 represents the original size.

MoveTo

Model:MoveTo(position: Vector3): ()

Moves the Model to the supplied world-space position.

PivotTo

Model:PivotTo(targetCFrame: CFrame): ()

Moves and rotates descendant parts so the model pivot matches the supplied CFrame. A model without usable contents produces an error. This operation requires serial execution.

ScaleTo

Model:ScaleTo(newScaleFactor: number): ()

Sets the Model's overall scale factor.

TranslateBy

Model:TranslateBy(delta: Vector3): ()

Translates the Model by a world-space offset.

Inherited members

Inherited47

Example

Luau
local model = Instance.new("Model")
local part = Instance.new("Part")
part.Anchored = true
part.Parent = model
model.PrimaryPart = part
model.Parent = workspace
model:PivotTo(CFrame.new(40, 1, 0))

Subclasses

WorldRoot

BasePart · Folder · Instance · CFrame