Part
A physical part with configurable shape, material, and surfaces.
- Creatable
Instance.new("Part")- Inherits
- BasePartPVInstanceInstance
- Replication
- Standard
Behavior
Part represents a block, ball, or cylinder. It inherits physical properties
and contact events from BasePart.
Summary
Whether physics can move the part.
The part's angular velocity around each axis.
The joint surface type on the back face.
The bottom-face joint surface.
The position and orientation in world space.
Whether the part blocks other parts.
Overrides material density, friction, and elasticity.
The joint surface type on the front face.
The joint surface type on the left face.
The part's linear velocity in studs per second.
The surface material used for rendering and physical density.
The surface reflectivity, from 0 to 1.
The rendering layer used for this geometry or light.
The joint surface type on the right face.
The top-face joint surface.
The transparency, from 0 (opaque) to 1 (invisible).
Returns parts recorded in the latest physics contact diagnostics.
Properties
Anchored
Part.Anchored: boolean = falseWhether physics can move the part. Defaults to false.
AngularVelocity
Part.AngularVelocity: Vector3 = Vector3.new(0, 0, 0)The part's angular velocity around each axis.
BackSurface
Part.BackSurface: Enum.SurfaceType = Enum.SurfaceType.SmoothThe joint surface type on the back face.
BottomSurface
Part.BottomSurface: Enum.SurfaceType = Enum.SurfaceType.InletThe bottom-face joint surface. Defaults to Inlet.
CFrame
Part.CFrame: CFrame = CFrame.new(0, 0, 0)The position and orientation in world space. Assignment updates both together.
CanCollide
Part.CanCollide: boolean = trueWhether the part blocks other parts. Defaults to true. Setting this to false does not disable Touched events.
CustomPhysicalProperties
Part.CustomPhysicalProperties: PhysicalProperties? = nilOverrides material density, friction, and elasticity. When unset, the material supplies these values.
FrontSurface
Part.FrontSurface: Enum.SurfaceType = Enum.SurfaceType.SmoothThe joint surface type on the front face.
LeftSurface
Part.LeftSurface: Enum.SurfaceType = Enum.SurfaceType.SmoothThe joint surface type on the left face.
LinearVelocity
Part.LinearVelocity: Vector3 = Vector3.new(0, 0, 0)The part's linear velocity in studs per second.
Material
Part.Material: Enum.Material = Enum.Material.PlasticThe surface material used for rendering and physical density. Defaults to Plastic.
Reflectance
Part.Reflectance: number = 0The surface reflectivity, from 0 to 1. Defaults to 0.
RenderLayer
Part.RenderLayer: Enum.RenderLayer = Enum.RenderLayer.DefaultThe rendering layer used for this geometry or light.
RightSurface
Part.RightSurface: Enum.SurfaceType = Enum.SurfaceType.SmoothThe joint surface type on the right face.
TopSurface
Part.TopSurface: Enum.SurfaceType = Enum.SurfaceType.StudsThe top-face joint surface. Defaults to Studs. Compatible surfaces can form joints when MakeJoints runs.
Transparency
Part.Transparency: number = 0The transparency, from 0 (opaque) to 1 (invisible). Defaults to 0.
Methods
GetTouchingParts
Part:GetTouchingParts(): { BasePart }Returns parts recorded in the latest physics contact diagnostics. See BasePart.
Inherited members
- Properties
- CanQueryCanSeparateCanTouchCastShadowCenterOfMassCollisionFidelityCollisionGroupColorCoordinateFrameElasticityFaceCountFrictionGravityScaleLockedMassMasslessMaterialSetMaterialVariantPositionRotationShapeSizeSmoothingAngleTextureIdTriangleCountVertexCountVisibilityMask
- Methods
- ApplyAngularImpulse()ApplyImpulse()ApplyImpulseAtPosition()GetContacts()GetExecutionGroup()GetMass()GetMesh()GetNetworkOwner()GetNetworkOwnershipAuto()GetVelocityAtPosition()Intersect()MakeEditable()Separate()SetMesh()SetNetworkOwner()SetNetworkOwnershipAuto()Subtract()Union()
- Events
- TouchedTouchEnded
- Properties
- ArchivableClassNameNameParent
- Methods
- AddComponent()AddTag()ClearAllChildren()ClearTags()Clone()Destroy()FindFirstAncestor()FindFirstAncestorOfClass()FindFirstAncestorWhichIsA()FindFirstChild()FindFirstChildOfClass()FindFirstChildWhichIsA()FindFirstDescendant()GetAttribute()GetAttributeChangedSignal()GetAttributes()GetChildren()GetComponent()GetComponentChangedSignal()GetComponents()GetDebugId()GetDescendants()GetFullName()GetPropertyChangedSignal()GetReferencing()GetTags()HasComponent()HasTag()IsA()IsAncestorOf()IsDescendantOf()RemoveComponent()RemoveTag()SetAttribute()WaitForChild()
- Events
- AncestryChangedAttributeChangedChangedChildAddedChildRemovedDescendantAddedDescendantRemovingDestroying
Example
local part = Instance.new("Part")
part.Size = Vector3.new(4, 1, 8)
part.Anchored = true
part.Parent = workspace