Part

The base class for physical objects

Properties

Name Type Description
CDataCDataThe coordinate data of this object in the 3D gamespace.
AnchoredBooleanWhen true, the part does not react to physics
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 Position Rotation Size Parent TextureID TextureTiling

Functions

Name Returns Description
AddForceVoidAdds a force to the part along each axis
AddTorqueVoidAdds a torque to the part
AddRelativeForceVoidAdds a relative force to the part along each axis
AddRelativeTorqueVoidAdds a relative torque to the part
PhysicsMoveVoidSets the position of the part and accounts for physics if unanchored
PhysicsRotateVoidSets the rotation of the part and accounts for physics if unanchored
Inherited from Dynamic SetParent Log IsA FindFirstChild FindFirstChildOfClass FindFirstParentOfClass MoveTo LocalToWorldPoint Clone GetChildren ClearChildren Destroy

Events

Name Description
TouchedOccurs when an object bumps into the part.