Model

Model : PVInstance

Overview

Models are containers that group objects that are placed in the world. Unlike simple folders, it provides a variety of functions to store and manage collections.

Description

Model provides functionalities like property management, transformation updates, script execution, and manages various aspects of game objects. Unlike folders, models provide geometry-based features and can be adjusted for group location and orientation using methods such as Primary Part and MoveTo.

Properties

PrimaryPart

BasePart

The Primary Part is a reference part in the model, and other parts or objects may use it as a reference point or move together based on the Primary Part.

Code Samples

local Model = script.Parent
Model.PrimaryPart = Model.Part

WorldPivot

CFrame

WorldPivot determines where the pivot of a Model which does not have a set Model.PrimaryPart is located.

Code Samples

//NotWork//

Methods

BreakJoints

The brake joint performs the function of breaking or disconnecting the joints of the model, mesh or structure.

Parameters

Return

void

Code Samples

MoveTo

The MoveTo method moves an object or entity to a specified position defined by InPosition.

Parameters

Vector3 InPosition

Return

void

Code Samples

//NotWork//

SetPrimaryPartCFrame

SetPrimaryPartCFframe method changes the value of the CFrame in the PrimaryPart, which allows you to modify the position and orientation of the model.

Parameters

CFrame InNewCFrame

Return

void

Code Samples

local Model = script.Parent

Model:SetPrimaryPartCFrame(CFrame.new(130, 45, -300))

Events