Skip to main content

Part

Inherits from DynamicInstance

Parts are physical objects that can be placed in the world.


Summary

Properties

Methods


Properties

Anchored

Part.Anchored: bool

Specifies whether the part is to be affected by physics or not.


AngularDrag

Part.AngularDrag: float

Angular drag (air resistance) of this part.


AngularVelocity

Part.AngularVelocity: Vector3

Specifies the angular velocity of a part.


Bounciness

Part.Bounciness: float

Determines how bouncy the part is when players land on it.


CanCollide

Part.CanCollide: bool

Specifies whether the part can be collided with or not.


CastShadows

Part.CastShadows: bool

Specifies whether the part casts its shadow on other parts.


Color

Part.Color: Color

Specifies the color of a part.


Drag

Part.Drag: float

Determines Drag (air resistance) of this part.


Friction

Part.Friction: float

Determines the amount of friction between the part and players on it.


Forward

Part.Forward: Vector3

Returns the forward vector of the part


HideStuds

Part.HideStuds: bool

Determines whether to display studs on the part or not.


IsSpawn

Part.IsSpawn: bool

Specifies whether the part can be used as a spawn location or not.


Mass

Part.Mass: float

Specifies the mass of a part in kilograms.


Material

Part.Material: PartMaterial

Specifies the material of the part.

Example

part.Material = PartMaterial.Concrete

Shape

Part.Shape: PartShape

Specifies the shape of a part.

Example

part.Shape = PartShape.Wedge

UseGravity

Part.UseGravity: bool

Determines whether this part is affected by gravity or not.


Velocity

Part.Velocity: Vector3

Specifies the velocity of a part.


Methods

MovePosition

Part:MovePosition(position: Vector3)

Parameters:

ParameterTypeDefaultDescription
positionVector3-

Moves the part to the specified position while keeping physics in mind.

Example

game["Environment"]["Part"]:MovePosition(Vector3.New(50, 0, 0))

MoveRotation

Part:MoveRotation(rotation: Vector3)

Parameters:

ParameterTypeDefaultDescription
rotationVector3-

Rotates the part while keeping physics in mind.

Example

game["Environment"]["Part"]:MoveRotation(Vector3.New(0, 180, 0))

AddForce

Part:AddForce(force: Vector3, mode: ForceMode)

Parameters:

ParameterTypeDefaultDescription
forceVector3-
modeForceMode-

Adds a force to the part.


AddTorque

Part:AddTorque(torque: Vector3, mode: ForceMode)

Parameters:

ParameterTypeDefaultDescription
torqueVector3-
modeForceMode-

Adds a torque to the part.


AddForceAtPosition

Part:AddForceAtPosition(force: Vector3, position: Vector3, mode: ForceMode)

Parameters:

ParameterTypeDefaultDescription
forceVector3-
positionVector3-
modeForceMode-

Adds a force to the part at a specific position.


AddRelativeForce

Part:AddRelativeForce(force: Vector3, mode: ForceMode)

Parameters:

ParameterTypeDefaultDescription
forceVector3-
modeForceMode-

Adds a force to the part relative to its own rotation.


AddRelativeTorque

Part:AddRelativeTorque(torque: Vector3, mode: ForceMode)

Parameters:

ParameterTypeDefaultDescription
torqueVector3-
modeForceMode-

Adds a torque to the part relative to its own rotation.

Properties