- Not to be confused with the Part class.
A part is an instance that represents an individual collidable polygon mesh rendered within the 3D scene. Parts are essentially the building blocks of the world of a place. Roblox has classes for different types of parts, with BasePart as the base class which includes members that allow changing a part's appearance and physical properties. In run time, parts' motion and collision are simulated by the physics engine. The process of assembling parts to form a model or a world is known as building. Roblox Studio facilitates this process.
A unit in Roblox is known as a stud, which is used to measure parts and distances. The internal texture of a part's surface other than Smooth represents studs.
History[]
Trusses were added to Roblox on April 24, 2009, alongside the Slate material and the Universal surface.[1]
On April 4, 2013, bevels were removed for performance reasons. Furthermore, a blog post was published stating that "they hurt performance and don't fit our vision for the future look of ROBLOX".[2]
In 2018, the Torso MeshType (representing a isosceles trapezoid) would be deprecated and the MeshType would act as a block instead.[3]
Classes[]
The BasePart serves as the base class for all types of parts, which includes members that allow changing a part's appearance and physical properties:
- The Material property changes a part's material.
- The Transparency property changes a part's transparency, with the value one rendering the part invisible.
- The Reflectance property affects how a part reflects lighting around it.
- The CanCollide property, if set to true, allows the part to collide with other parts, affecting its motion as well as others.
- The Anchored property, if set to true, prevents the part from ever moving until it is set to false.
The base class contains these sub-classes:
- Part has one of three simple shapes: Block, Ball and Cylinder.
- Two more shapes are used by WedgePart and CornerWedgePart.
- TrussPart is used to make "ladders" for characters to climb.
- SpawnLocation acts as spawn points for Players.
- VehicleSeat acts as a seat for any character to sit on.
- Terrain represents the terrain.
- MeshPart allows linking of a mesh file which will precalculate the part's collision mesh from the linked mesh.
- PartOperation is a base class for solid modeling-related parts:
- UnionOperation, also simply known as a union, is a combination of multiple parts including other unions.
- NegateOperation is used to subtract from a part or a union to create a new union.
Part[]
Part represents one of the three shapes, block, ball and cylinder, and is considered to be the most basic part for building.
Wedge[]
WedgePart and CornerWedgePart represents a ramp and a corner ramp, respectively. Wedges differ from the SpecialMesh wedges in that WedgeParts behave like an inclined plane, but SpecialMesh wedges behave like their parent brick.
Truss[]
A TrussPart is a part that is climbable. Unlike parts, its dimensions cannot be less than 2 studs long. It also cannot have two or more of its dimensions be resized to more than two studs.
Trusses have a unique property called "Style" which affects their appearance, with values AlternatingSupports (supports change direction every 2x2x2 section), BridgeStyleSupports (supports only appear on 2 sides and change direction halfway), and NoSupports.
MeshPart[]
MeshPart allows linking content to a mesh asset, which, unlike SpecialMesh, yields a mesh from the asset with its own generated collision mesh. The part's collision mesh is calculated based on the geometry, which can be changed through MeshPart.CollisionFidelity
property.
Terrain[]
- Main article: Terrain
The terrain is a voxel-based mesh represented by the Terrain instance parented to the Workspace. Unlike parts, the mesh can be modified by its API or through Terrain Editor tools in Roblox Studio.
Meshes[]
Mesh classes, including SpecialMesh, BlockMesh and CylinderMesh, change the appearance of a part's mesh when parented to the part. SpecialMesh has different shapes represented by the MeshType enum, while BlockMesh and CylinderMesh represents a block and a cylinder, respectively (similar to Part). Unlike BlockMesh and CylinderMesh, SpecialMesh has the FileMesh enum item which allows it to link to a mesh asset, similar to MeshPart.
Shapes[]
Shapes are represented by both meshes and parts. Some shapes are shared by both, sometimes with different names or in different rotations. The following list compares shapes of both types:
Shape | Part | Mesh |
---|---|---|
Block | Part ("Block" PartType) | BlockMesh, SpecialMesh ("Brick" MeshType) |
Ball | Part ("Ball" PartType) | SpecialMesh ("Sphere" MeshType) |
Cylinder | Part ("Cylinder" PartType) | |
Wedge | WedgePart | SpecialMesh ("Wedge" MeshType) |
Corner wedge | CornerWedgePart | SpecialMesh (" |
Truss | TrussPart | |
Character head | SpecialMesh ("Head" MeshType) |
World[]
A world refers to the Workspace where all parts and other 3D-related objects such as the sky are rendered and where physics is simulated. The Workspace provides a Terrain to manipulate the terrain and a Camera for each client (including the server) to manipulate some of the renderer's properties.
Physics[]
In run time, physics of all parts that are descendants of the Workspace are simulated by the physics engine. Motion can be disabled for parts that have their property Anchored set to true
which are known as anchored parts. Unanchored parts that are connected to an anchored part, whether directly or indirectly, are also considered anchored.
The physics engine simulates physics of assemblies rather than individual parts. An assembly is a group of one or more parts connected by a weld (such as WeldConstraint) or an animated joint (Motor6D).
The engine automatically precalculates each MeshPart's collision mesh based on its mesh geometry to optimize simulation. How the engine calculates the collision mesh can be changed through MeshPart.CollisionFidelity
property.
Legacy[]
FormFactor[]
FormFactor is a deprecated property that is set to a FormFactor enum. Each FormFactor enum tells a minimum size of a part as well as how the part is scaled. The FormFactor property was used in legacy building, but however, it was no longer supported by the Scale tool in Roblox Studio as well as the Resize
method. FormFactor is based on Lego part sizes, where three plates stacked on top of each other becomes a brick.
Gallery[]
Part[]
Truss[]
Trivia[]
This section is a trivia section. Please relocate any relevant information into other sections of the article.
- Players used to be able to quickly climb trusses by holding the space bar while climbing. However, this can no longer be done (as the player now simply jumps off the truss) due to updates in physics and player animations.
- In older versions of Roblox, the thumbnails of models that were deleted appeared as a red truss.
References[]
- ↑ John Shedletsky (2009, April 24). "Builders of Robloxia Rejoice!". From Roblox Blog. Accessed November 24, 2022. Archived from the original on January 12, 2022.
- ↑ Gemlocker (2013, April 4). "Bye Bye Bevels: The First Step Toward Our New Look". From Roblox Blog. Accessed February 26, 2023. Archived from the original on March 23, 2022.
- ↑ https://devforum.roblox.com/t/specialmeshmeshtypeenummeshtypetorso-will-be-deprecated-soon/101765
External links[]
- Parts on the Roblox Creator Documentation
- BasePart on the Roblox Creator Documentation
- Understanding Assemblies on the Roblox Creator Documentation
Article quality evaluation