Part
Show Deprecated
The Part object is a type of BasePart. It comes in five different primitive shapes: Ball, Block, Cylinder, Wedge, and CornerWedge.
Code Samples
Create a Part in a Script
local part = Instance.new("Part")
part.Name = "JurassicPart"
part.Anchored = true
part.Shape = Enum.PartType.Ball
part.Color = Color3.new(1, 1, 1)
part.Parent = workspace -- Put the part into the Workspace
Summary
Properties
Properties inherited from FormFactorPart
Properties inherited from BasePart
Properties inherited from PVInstance
Properties inherited from Instance
Methods
Methods inherited from BasePart
Methods inherited from PVInstance
Methods inherited from Instance
Events
Events inherited from BasePart
Events inherited from Instance
Properties
Shape
Not Replicated
The Shape property sets the overall shape of the object to one of a predetermined list of built-in shapes.
The PartType enum controls the shape value, and has five possible shapes:
Shape/Value | Description |
---|---|
Ball | A spherical shape, like a basketball. |
Cylinder | A rod-like shape, like a tin can. |
Block | The default, brick shape. |
Wedge | A wedge shape with a slope on one side. |
CornerWedge | A wedge shape with slopes on two sides. |
Note that MeshPart and solid modeling can be used to obtain completely custom part shapes.
Code Samples
Create a Part in a Script
local part = Instance.new("Part")
part.Name = "JurassicPart"
part.Anchored = true
part.Shape = Enum.PartType.Ball
part.Color = Color3.new(1, 1, 1)
part.Parent = workspace -- Put the part into the Workspace
Properties inherited from FormFactorPart
Properties inherited from BasePart
Properties inherited from PVInstance
Properties inherited from Instance
Methods
Methods inherited from BasePart
Methods inherited from PVInstance
Methods inherited from Instance
Events
Events inherited from BasePart
Events inherited from Instance