Building with parts
Configure part geometry, physics, appearance, and constraints.
Part represents configurable physical geometry. Most physical properties are defined by BasePart.
Create a part
local part = Instance.new("Part")
part.Size = Vector3.new(4, 1, 8)
part.Anchored = true
part.Parent = workspaceNew parts are unanchored. Without support they fall and are removed below
workspace.FallenPartsDestroyHeight.
Anchoring and collision
Anchored prevents physics from moving a part. Scripts can still assign its
transform. Anchor static geometry and parts whose transforms are animated by
scripts to avoid competing physics updates.
CanCollide controls whether the part blocks other parts. It does not disable
Touched. A trigger volume can use CanCollide = false and Transparency = 1.
See BasePart for contact query
behavior. Use OverlapBox or OverlapSphere for spatial overlap queries.
Shape and size
Shape takes an Enum.PartType. Size is a Vector3 of
dimensions in studs along the local axes. Rotation does not change Size.
A ball uses the smallest dimension as its diameter.
local ball = Instance.new("Part")
ball.Shape = Enum.PartType.Ball
ball.Size = Vector3.new(4, 4, 4)
ball.Parent = workspaceAppearance and physical properties
Color takes a Color3. Material controls the surface
appearance and material-based physical properties. CustomPhysicalProperties
overrides density, friction, and elasticity.
Transparency ranges from 0 (opaque) to 1 (invisible). It does not disable
collisions. Reflectance ranges from 0 to 1.
Neon renders an emissive surface without illuminating nearby parts. Air is
invisible and contributes no mass.
Join parts
Use a WeldConstraint to keep two parts together. This example requires parts
named Base and AttachmentPart in workspace.
local weld = Instance.new("WeldConstraint")
weld.Part0 = workspace:WaitForChild("Base")
weld.Part1 = workspace:WaitForChild("AttachmentPart")
weld.Parent = weld.Part0Disable or destroy the constraint to allow independent movement. Face surface types provide separate surface-joint behavior.
Group parts
Use a Model to group parts for cloning and movement. PivotTo moves descendant parts using the model pivot. An optional PrimaryPart
selects the pivot reference; otherwise the pivot uses model bounds. Grouping does
not create physical welds.