Model

For examples on how to use, check ModelService.

Parameters

modelName: ModelType

Name of the model to be imported


Functions

setPosition(position: Vector3)

Sets the position of the model.

getPosition(): Vector3

Returns the position of the model.

setRotation(rotation: Vector3)

Sets the rotation of the model.

getRotation(): Vector3

Returns the rotation of the model.

setCFrame(cframe: CFrame)

Sets the CFrame of the model to the specified CFrame.

getCFrame(): CFrame

Returns the CFrame of the model.

setScale(scale: number)

Sets the scale of the model.

getScale(): number

Returns the scale of the model.

setCollidable(collidable: boolean)

Sets whether the model should collide with other models, blocks, and players. Defaults to true on creation.

setAnchored(anchored: boolean)

Sets whether the model should have physics applied to it. Defaults to true on creation.

setTransparency(transparency: number)

Sets the transparency of the model. Transparency ranges from 0 (opaque) to 1 (invisible).

destroy()

Destroys the model.

Last updated