Part

For examples on how to use, refer to PartService.

Creates a Roblox BasePart with a block texture from ItemType.

Functions

setPosition(position: Vector3)

Sets the position of the part.

getPosition(): Vector3

Returns the position of the part.

setRotation(rotation: Vector3)

Sets the rotation of the part.

getRotation(): Vector3

Returns the rotation of the part.

setCFrame(cframe: CFrame)

Sets the CFrame of the part.

getCFrame(): CFrame

Returns the CFrame of the part.

setSize(area: Vector3)

Sets the size of the part.

getSize(): Vector3

Returns the size of the part.

setCollidable(collidable: boolean)

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

setAnchored(anchored: boolean)

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

setTransparency(transparency: number)

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

getTransparency(): number

Returns the transparency of the part. Transparency ranges from 0 (opaque) to 1 (invisible).

destroy()

Destroys the part.

Last updated