Part
Show Deprecated
The Part object is a type of BasePart. It comes in three different primitive shapes: Ball, Cylinder, or Block.
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 BasePart
Properties inherited from PVInstance
Properties inherited from Instance
Properties inherited from FormFactorPart
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 type of shape the object has.
The PartType enum controls the shape value, and has three 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. |
To obtain custom part shapes, you can use a MeshPart instead of a Part.
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 BasePart
Properties inherited from PVInstance
Properties inherited from Instance
Properties inherited from FormFactorPart
Methods
Methods inherited from BasePart
Methods inherited from PVInstance
Methods inherited from Instance
Events
Events inherited from BasePart
Events inherited from Instance