Beams | Documentation - Roblox Creator Hub (2024)

A Beam is an object that renders a Texture between two Attachment objects. By setting beam properties, you can:

  • Add a texture and color gradient to create interesting visuals like waterfalls and force fields.

  • Modify a beam's transparency so that it fades over time.

  • Warp its shape by changing the width or curve of each attachment point.

  • Specify the texture's length and mode to affect how it repeats across the beam's length.

Creating a Beam

Before you begin to create a beam, it's useful to toggle on visibility of attachments so you can see where the beam starts and ends.

  1. In the menu bar, navigate to the Model tab, then the Constraints section.

  2. If it's not currently enabled, toggle on Constraint Details.

    Beams | Documentation - Roblox Creator Hub (1)

To create a beam:

  1. Create two parts and position them a short distance from each other. One will act as the start of the beam and the other as the end of the beam. Group the parts into a Model.

  2. In the Explorer window, add an Attachment object to each part:

    1. Hover over one part and click the ⊕ button. A contextual menu displays.

    2. From the contextual menu, insert an Attachment.

    3. Repeat for the other part.

  3. In the Explorer window, add a Beam object to the model:

    1. Hover over the model and click the ⊕ button. A contextual menu displays.

    2. From the contextual menu, insert a Beam.

      Beams | Documentation - Roblox Creator Hub (2)
  4. Select the new Beam object and assign its attachments. Ensure you assign each attachment property to a different Attachment object.

    1. In the Properties window, select the Attachment0 property. Your cursor changes.

    2. In the Explorer window, select the attachment of the part you want to be the start of your beam.

    3. Back in the Properties window, select the Attachment1 property. Your cursor changes.

    4. In the Explorer window, select the attachment of the part you want to be the end of your beam.

Beams | Documentation - Roblox Creator Hub (3)

Beams require attachments to function properly. If you remove either attachment object from step 4, the beam stops rendering its texture.

Customizing Beams

By experimenting with the following properties, you can customize a beam's visual appearance to make unique gameplay elements like force fields, waterfalls, and pathway obstacles.

The visual quality of your beams can change depending on the graphics settings on the player's device. To review your beam across quality levels, it's recommended to open Studio Settings, search for Editor Quality Level, and set it to the both the lowest and highest level after you finish customizing your beam.

Texture

The Texture property renders that texture across the length of the beam. You can set a beam's Texture property to any asset ID. For more information, including how to add or upload your own textures, see Importing Assets.

Beams | Documentation - Roblox Creator Hub (4)

A beam renders its texture using two triangles drawn between Segments, and the segments are laid out between the two attachment points' orientation. When you rotate attachment points in different directions, segments also rotate.

Beams | Documentation - Roblox Creator Hub (5)

Color

The Color property tints the beam's texture to either a specific hue, or to a gradient ColorSequence across its entire span.

  1. In the Explorer window, select the beam.

  2. In the Properties window, select the Color property. You can either:

    1. Click on the color square to open the Colors pop-up window and select a color.

    2. Input three numbers into the RGB color value field.

    Beams | Documentation - Roblox Creator Hub (6)

Transparency

The Transparency property sets the transparency of the beam as a consistent value or as a NumberSequence with ranges from 0 (totally opaque) to 1 (fully clear).

  1. In the Explorer window, select the beam.

  2. In the Properties window, select the Transparency property.

  3. Input the desired opacity for the beam.

Width

You can set the beam's width in studs at each endpoint by configuring theWidth0 and Width1 properties. A higher value equates to a larger width and a lower value equates to a smaller width. If you set either value to smaller than 0, Studio sets it back to 0.

The beam below has a Width0 value of 0.5 and aWidth1 value of 3.

Beams | Documentation - Roblox Creator Hub (7)

Texture Length/Mode

A beam's TextureLength and TextureMode determine how its texture repeats across its length.

When TextureMode is set to Enum.TextureMode.Wrap or Enum.TextureMode.Static, the texture repetitions will equal the beam's overall length (instuds) divided by its TextureLength.

Beams | Documentation - Roblox Creator Hub (8)

When TextureMode is set to Enum.TextureMode.Stretch, the texture will repeat TextureLength times across the beam's overall length.

Beams | Documentation - Roblox Creator Hub (9)

Facing

A beam is a 2D projection existing in 3D space, meaning that it may not be visible from every angle. The FaceCamera property, when set to true, ensures that the beam always faces the CurrentCamera, regardless of its orientation.

Curve

Beams are configured to use a cubic Bézier curve formed by four control points. This means they are not constrained to straight lines and the curve of the beam can be modified by changing CurveSize0, CurveSize1, and the orientation of the beam's Attachments.

  • P0 — The start of the beam; position of Attachment0.

  • P1CurveSize0 studs away from Attachment0, in the positive X direction of Attachment0.

  • P2CurveSize1 studs away from Attachment1, in the negative X direction of Attachment1.

  • P3 — The end of the beam; position of Attachment1.

Beams | Documentation - Roblox Creator Hub (10)Beams | Documentation - Roblox Creator Hub (11)
Beams | Documentation - Roblox Creator Hub (2024)
Top Articles
Latest Posts
Article information

Author: Barbera Armstrong

Last Updated:

Views: 5343

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Barbera Armstrong

Birthday: 1992-09-12

Address: Suite 993 99852 Daugherty Causeway, Ritchiehaven, VT 49630

Phone: +5026838435397

Job: National Engineer

Hobby: Listening to music, Board games, Photography, Ice skating, LARPing, Kite flying, Rugby

Introduction: My name is Barbera Armstrong, I am a lovely, delightful, cooperative, funny, enchanting, vivacious, tender person who loves writing and wants to share my knowledge and understanding with you.