Part

The base class for physical objects

Properties

Name Type Description
CDataCDataThe coordinate data of this object in the 3D gamespace.
MaterialNumberWhen true, the part does not react to physics
AnchoredBoolean
StaticObjectBoolean
CastsShadowsBooleanDoes the part cast shadows or not?
MassNumberThe mass of the part
DragNumberThe drag of the part. A higher drag means the part slows down faster.
AngularDragNumberThe angular drag of the part. A higher angular drag makes the part harder to rotate.
UseGravityBooleanDetermines whether gravity affects the part.
VelocityVector3The velocity of the part. Zero if anchored
AngularVelocityVector3The angular velocity of the part. Zero if anchored
CanCollideBooleanWhen true, the part can overlap other physics objects
ShapeStringThe 3D geometric shape of the part. Currently available: Cube, Sphere, Cylinder, Cone, Wedge
ColorPartColorThe color of the part
OpacityNumberThe opacity of the part represented as a byte. (0 = invisible, 255 = opaque)
TransparencyNumberThe transparency of the part represented as a byte. (0 = opaque, 255 = invisible)
SpawnBooleanWhen true, players can spawn on top of this part.
Inherited from Dynamic Name Enabled Root Tag Position Rotation LocalRotation Size Parent TextureID TextureTiling TextureTilingY

Functions

Name Returns Description
AddForceVoidAdds a force to the part along each axis. Type is Force type (0 = Force, 1 = Impulse, 2 = VelocityChange, 3 = Acceleration)
AddForceAtPositionVoidAdds a force to the part at a specific position on the part. Type is Force type (0 = Force, 1 = Impulse, 2 = VelocityChange, 3 = Acceleration)
AddTorqueVoidAdds a torque to the part
AddRelativeForceVoidAdds a relative force to the part along each axis. Type is Force type (0 = Force, 1 = Impulse, 2 = VelocityChange, 3 = Acceleration)
AddRelativeTorqueVoidAdds a relative torque to the part
PhysicsMoveVoidSets the position of the part and accounts for physics if unanchored
IsTouchingBooleanChecks if this part is touching another part
PhysicsRotateVoidSets the rotation of the part and accounts for physics if unanchored
SetCollisionsVoidEnable/disable collisions between two parts. Set ignore to true to ignore collisions between this part and the part specified
Inherited from Dynamic SetParent Log IsA FindFirstChild FindFirstChildOfClass FindFirstParentOfClass MoveTo NetworkSync LookAt LocalToWorldPoint Clone GetChildren ClearChildren Destroy

Events

Name Description
TouchedOccurs when an object bumps into the part.
TouchEnded