Skip to content

Latest commit

 

History

History
202 lines (143 loc) · 10.4 KB

index.md

File metadata and controls

202 lines (143 loc) · 10.4 KB
title description
Parts
Parts are Roblox's primary building blocks.

Class.Part|Parts are descendants of the Class.BasePart class and are Roblox's primitive building blocks with properties like position, size, orientation, and color. You can use basic parts as is, or you can apply solid modeling operations to combine parts into more complex shapes.

For advanced and intricate 3D models, you can also import third-party model files as Class.MeshPart|MeshParts as outlined in Meshes.

A single gray sphere part

Basic sphere part

A bright blue hollow bowl that was made with solid modeling operations.

Bowl created with solid modeling

A high-quality treasure chest mesh with a texture.

Mesh with texture

By default, parts are rigid bodies that follow real-world physical mechanics, including gravity, collision, and momentum. You can connect related parts together as a single assembly using a Class.WeldConstraint, or a joint like Class.Motor6D or Class.Bone. As an assembly, the connected parts act as a single rigid entity, referencing a common position, orientation, and scale.

You can use a Class.Model container to group related parts together and access the group as a single assembly in the Explorer. See Models for more information.

Basic Part Types

Class.Part objects can take the shape of blocks, spheres, cylinders, wedges, or corner wedges. In addition, Class.TrussPart acts as a truss beam that characters can climb like a ladder.

Block Sphere Cylinder Wedge Corner Wedge
A single gray block part A single gray sphere part A single gray cylinder part A single gray wedge part A single gray corner wedge part

Part Properties

Each part has a variety of properties that you can customize through the Properties window.

A close up view of the Properties window with the Appearance and Transform properties highlighted.

The following are commonly utilized properties:

  • Class.BasePart|Anchored controls if physics affects the position of the part. When this property is set to true, the part never changes position due to gravity or any other force. You should anchor most parts in your experience, otherwise gravity and physics affect your parts as soon as the experience begins, and this might lead to unwanted changes to your scenery and props.
  • Class.BasePart|CanCollide controls whether or not a part can collide with other parts. When this property is set to true, the part is impenetrable and the physics engine accounts for it within your experience. Conversely, when this property is set to false, the part can pass through anything, and the physics engine does not account for it.
  • Class.BasePart|Transparency sets a part's visibility to any value between the default value of 0 (fully visible) and 1 (fully transparent). If you have many partially transparent parts, they can slow down performance. To alleviate this, merge them using solid modeling.

Inserting Parts

The Part button inserts a new part into the workspace. Clicking the small dropdown arrow on the button lets you select either Block, Sphere, Wedge, Corner Wedge, or Cylinder.

Studio's Model tab with the Insert Part tool and its Part Type Picker highlighted.

To insert a `Class.TrussPart` (not available on the insertion menu), use the [Explorer](../studio/explorer.md) as outlined [here](../studio/explorer.md#inserting-and-parenting).

Selecting Parts

As you hover over parts in the viewport, they are outlined to indicate their potential selection. You can select an outlined part by clicking it, or you can select multiple parts by holding Shift, Ctrl, or as you hover over and click them.

See here for advanced methods of selecting parts in the 3D viewport.

Manipulating Parts

You can move, scale, and rotate selected parts either through modeling tools or by setting a new position, size, or orientation in the Properties window.

When using the tools, you can move, scale, or rotate parts in either world orientation or local orientation by pressing CtrlL on Windows or L on Mac. When you enable local orientation, the arrow axis indicators change to a part's local orientation, and an L indicator displays. For more information, see Object and World Space.

An angled gray block part with draggers in World orientation mode.

An angled gray block part with draggers in Local orientation mode. The L to signify that the object is in Local orientation mode is highlighted.

Moving Parts

Parts move on the X (red), Y (green), and Z (blue) axes. You can move a part to a new position using the Move tool.

  1. In the Tools section, select the Move tool, then select the part you want to move.

    Studio's Model tab with the Move tool highlighted.
  2. Click and drag the arrow that is pointing in the direction you want to move the part.

    An angled gray block part with the Move tool's visual aids.

Scaling Parts

Parts scale on the X (red), Y (green), and Z (blue) axes. You can make a part larger or smaller by using the Scale tool.

  1. In the Tools section, select the Scale tool, then select the part you want to scale.

    Studio's Model tab with the Scale tool highlighted.
  2. Click and drag a ball to scale the part in that direction.

    An angled gray block part with the Scale tool's visual aids.

Rotating Parts

Parts rotate on the X (red), Y (green), and Z (blue) axes. You can rotate a part to a new angle using the Rotate tool.

  1. In the Tools section, select the Rotate tool, then select the part you want to rotate.

    Studio's Model tab with the Rotate tool highlighted.
  2. Click and drag a circle to rotate the part in that direction.

    An angled gray block part with the Rotate tool's visual aids.

Coloring Parts

While a part is gray by default, you can change it to any color through the following methods.

Hexagon Map

Clicking the small dropdown arrow on the Color widget reveals a hexagonal color picker and, by default, applies the chosen color to all selected parts. Once you've selected a color, you can quickly apply it to other parts by selecting those parts and clicking the Color button itself.

Studio's Model tab with the Color button's components highlighted.

Colors Popup

The Colors popup allows you to set a color through your operating system's color picker widget. To access it, navigate to the Properties window and click the small box to the left of the Class.BasePart.Color|Color property.

A close up view of the Properties window with the Color property's color box highlighted.

RGB Value

To define a specific RGB color value for a part, enter an RGB value into the Class.BasePart.Color|Color property field.

A close up view of the Properties window with the Color property's RGB color value highlighted.

Applying Materials

Similar to color, you can customize a part's material to simulate real-world materials such as wood, glass, or fabric. When selecting a material, consider the following:

  • Material affects the physical traits of a part, not just its appearance. For example, the Concrete material is heavier than the Plastic material, so a concrete brick will have higher density than a plastic brick and sink in water faster.

  • Some materials have special physical effects. For example, parts will appear to glow if they are set to the Neon material.

    An angled red block part with a smooth plastic material. SmoothPlastic An angled red block part with a glowing neon material. Neon

See Materials for more information on how to apply both default and custom materials to parts.