Beams are an effect that can be used to create lasers, force fields, and even waterfalls. This object draws a texture between two points with customizable properties like speed, width, and curve.
In this course, you’ll create a laser trap that uses a beam and insert a script to set a player’s health to 0 when the trap is touched.
Attachments are where one object can connect to another. In this case, attachments will be used for the start and end points of the beam.
Attachments aren’t normally visible. To view attachments, toggle on Constraint Details in the Model tab.
Create an anchored part or model named LaserTrap. Then, add two attachments named StartAttachment and EndAttachment.
New attachments are created in the center of the part. For the beam, the attachments will need to be moved into position.
Select StartAttachment (1) and use the Move tool to position it at the edge of the laser trap.
Move EndAttachment (2) further away to where the laser should stop.
Can't See Attachments?
Attachments may be hidden inside a part. To display hidden attachments, enable Draw On Top from the Model tab.
Create the Beam
With the attachments in place, a beam can now be created.
Under LaserTrap, add a Beam object named Laser.
With Laser selected, find Attachment0 in the Properties window. Click the empty box to the right of the property and then, in the Explorer, click StartAttachment.
Set Attachment1 to EndAttachment using the same process. The properties should appear as below.
By default, a beam doesn’t always face the camera. This may lead to situations where players are unable to see a beam from different angles.
Next Page Customizing the Beam