16 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

Beam

Inherits from: Instance → Object

A Beam object connects two Attachments by drawing a texture between them.

To display, a beam must be a descendant of the Workspace with its Attachment0 and Attachment1 properties set to Attachments also descending from the Workspace.

The beam's appearance can be customized using the range of properties outlined below. Also see the Beams guide for visual examples.

Beam Curvature

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.

Beam curvature diagram

Inherits from: Instance

Memory category: Instances

Code samples: View on Creator Hub (Creating-a-Beam-From-Scratch).

Properties

NameType / ReturnsDescription
Beam.Attachment0AttachmentThe Attachment the beam originates from.
Beam.Attachment1AttachmentThe Attachment the beam ends at.
Beam.BrightnessfloatScales the light emitted from the beam when LightInfluence is less than 1.
Beam.ColorColorSequenceDetermines the color of the beam across its Segments.
Beam.CurveSize0floatDetermines, along with Attachment0, the position of the second control point in the beam's Bézier curve.
Beam.CurveSize1floatDetermines, along with Attachment1, the position of the third control point in the beam's Bézier curve.
Beam.EnabledbooleanDetermines whether the beam is visible or not.
Beam.FaceCamerabooleanDetermines whether the Segments of the beam will always face the camera, regardless of its orientation.
Beam.LightEmissionfloatDetermines to what degree the colors of the beam are blended with the colors behind it.
Beam.LightInfluencefloatDetermines the degree to which the beam is influenced by the environment's lighting.
Beam.LocalTransparencyModifierfloatDetermines a multiplier for Beam.Transparency that is only visible to the local client.
Beam.SegmentsintSets how many straight segments the beam is made up of.
Beam.TextureContentIdThe content ID of the texture to be displayed on the beam.
Beam.TextureContentContentThe texture displayed on the beam. Supports asset URIs.
Beam.TextureLengthfloatSets the length of the beam's texture, dependent on TextureMode.
Beam.TextureModeTextureModeDetermines the manner in which the Texture scales and repeats.
Beam.TextureSpeedfloatDetermines the speed at which the Texture image moves along the beam.
Beam.TransparencyNumberSequenceDetermines the transparency of the beam across its segments.
Beam.Width0floatThe width of the beam at its origin (Attachment0), in studs.
Beam.Width1floatThe width of the beam at its end (Attachment1), in studs.
Beam.ZOffsetfloatThe distance, in studs, the beam display is offset relative to the CurrentCamera.

Inherited from Instance

NameType / ReturnsDescription
Instance.ArchivablebooleanDetermines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published.
Instance.archivableboolean
Instance.CapabilitiesSecurityCapabilitiesThe set of capabilities allowed to be used for scripts inside this container.
Instance.IsInSandboxbooleanIndicates whether the instance is inside a sandboxed container.
Instance.NamestringA non-unique identifier of the Instance.
Instance.ParentInstanceDetermines the hierarchical parent of the Instance.
Instance.PredictionModePredictionModeReflects the client-side prediction mode applied to the instance under server-authoritative physics.
Instance.RobloxLockedbooleanA deprecated property that used to protect CoreGui objects.
Instance.SandboxedbooleanWhen enabled, the instance can only access abilities in its Capabilities list.
Instance.UniqueIdUniqueIdA unique identifier for the instance.

Inherited from Object

NameType / ReturnsDescription
Object.ClassNamestringA read-only string representing the class this Object belongs to.
Object.classNamestring

Beam.Attachment0

The Attachment the beam originates from. This attachment is the first control point on the beam's cubic Bézier curve; its orientation, alongside the CurveSize0 property, determines the position of the second control point. See Beams for more details.

For the Attachment where the beam ends, see Attachment1.

FieldValue
typeAttachment
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryShape
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.Attachment1

The Attachment the beam ends at. This attachment is the fourth and final control point on the beam's cubic Bézier curve; its orientation, alongside the CurveSize1 property, determines the position of the third control point. See Beams for more details.

For the Attachment where the beam originates from, see Attachment0.

FieldValue
typeAttachment
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryShape
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.Brightness

Scales the light emitted from the beam when LightInfluence is less than 1. This property is 1 by default and can set to any number within the range of 0 to 10000. Increasing the value of LightInfluence decreases the effect of this property's value.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.Color

Determines the color of the beam across its Segments. If Texture is set, this color will be applied to the beam's texture. If no Texture is set, the Beam will appear as a solid line colored in accordance with this property.

This property is a ColorSequence, allowing the color to be configured to vary across the length of the beam. Consider the following ColorSequence which, when applied to a beam, would yield the pictured result.

local colorSequence = ColorSequence.new({
		ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)), -- Red
		ColorSequenceKeypoint.new(0.5, Color3.fromRGB(0, 188, 203)), -- Cyan
		ColorSequenceKeypoint.new(1, Color3.fromRGB(196, 0, 255)), -- Purple
	}
)

Note the beam's coloration also depends on the number of Segments the Beam has. Each segment of the beam can only show a transition between two colors. Therefore a Beam will need to have at least n-1 segments in order for the color to display correctly, where n is the number of ColorSequenceKeypoints in the ColorSequence.

FieldValue
typeColorSequence
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.CurveSize0

Determines, along with Attachment0, the position of the second control point in the beam's Bézier curve. See Beams for more details.

The position of this point can be determined by the following equation:

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryShape
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Code samples: View on Creator Hub (Beam-CurveSize0).

Beam.CurveSize1

Determines, along with Attachment1, the position of the third control point in the beam's Bézier curve. See Beams for more details.

The position of this point can be determined by the following equation:

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryShape
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Code samples: View on Creator Hub (Beam-CurveSize1).

Beam.Enabled

Determines whether the beam is visible or not.

When this property is set to false, the beam's Segments will not be displayed.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.FaceCamera

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.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryShape
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.LightEmission

Determines to what degree the colors of the beam are blended with the colors behind it. It should be set in the range of 0 to 1. A value of 0 uses normal blending modes and a value of 1 uses additive blending.

This property should not be confused with LightInfluence which determines how the beam is affected by environmental light.

This property does not cause the beam to light the environment.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.LightInfluence

Determines the degree to which the beam is influenced by the environment's lighting, clamped between 0 and 1. When 0, the beam will be unaffected by the environment's lighting. When 1, it will be fully affected by lighting as a BasePart would be.

See also LightEmission which specifies to what degree the colors of the beam are blended with the colors behind it.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.LocalTransparencyModifier

The LocalTransparencyModifier property is a multiplier applied to the beam's Transparency that is only visible to the local client. It does not replicate from client to server and is useful for when a beam should not render for a specific client.

Uses the same formula as BasePart.LocalTransparencyModifier.

A value of 0 (default) has no effect on the beam's transparency. A value of 1 makes the beam completely invisible to the local client regardless of its Transparency value.

FieldValue
typefloat
tags["Hidden","NotReplicated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":false,"can_save":false}
capabilities["Basic"]

Beam.Segments

Rather than being a perfect curve, a beam is made up of straight segments. The more segments, the higher the resolution of the curve. The Segments property sets how many straight segments the beam is made up of, with a default value of 10.

Note that the Color and Transparency properties require a certain number of segments to display correctly. This is because each segment can only show a transition between two colors or transparencies. Therefore a Beam requires at least n-1 segments to display correctly, where n is the number of keypoint associated with the beam's Color and Transparency.

FieldValue
typeint
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryShape
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.Texture

The content ID of the texture to be displayed on the beam. If this property is not set, the beam will be displayed as a solid line; this also occurs when the texture is set to an invalid content ID or the image associated with the texture has not yet loaded.

The appearance of the texture can be further modified by other beam properties including Color and Transparency.

Scaling of the texture is determined by the TextureMode, TextureLength, Width0, and Width1 properties.

FieldValue
typeContentId
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.TextureContent

The texture displayed on the beam. Supports asset URIs.

If this property is set to Content.none, the beam displays as a solid line colored by its Color property. The appearance of the texture can be further modified by Color, Transparency, and scaling is determined by TextureMode, TextureLength, Width0, and Width1.

FieldValue
typeContent
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.TextureLength

Sets the length of the beam's texture, dependent on TextureMode.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.TextureMode

This property, alongside TextureLength, determines how a beam's Texture repeats.

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

TextureMode diagram with Wrap mode

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

TextureMode diagram with Stretch mode
FieldValue
typeTextureMode
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.TextureSpeed

Sets the number of texture cycles per second at which the Texture image moves along the beam, where one cycle is a full traversal of the texture's UV range. When this property is a positive value, the beam's texture will move from Attachment0 to Attachment1. This direction can be inverted by setting this property to a negative number. The default value is 1.

How far one cycle travels along the beam in studs depends on TextureMode and TextureLength.

Examples

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.Transparency

Determines the transparency of the beam across its segments. This property is a NumberSequence, allowing the transparency to be configured to vary across the length of the beam.

Consider the following NumberSequence which, when applied to a beam, would yield the pictured result.

local numberSequence = NumberSequence.new({
		NumberSequenceKeypoint.new(0, 0), -- Opaque
		NumberSequenceKeypoint.new(0.5, 1), -- Transparent
		NumberSequenceKeypoint.new(1, 0), -- Opaque
	}
)

Note that the beam's transparency also depends on the number of Segments. Each segment of the beam can only show a transition between two transparencies. Therefore a beam will need to have at least n-1 segments in order to display correctly, where n is the number of NumberSequenceKeypoints in the NumberSequence.

FieldValue
typeNumberSequence
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.Width0

The width of the beam at its origin (Attachment0), in studs. The beam's width will change linearly to Width1 studs at its end (Attachment1).

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryShape
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.Width1

The width of the beam at its end (Attachment1), in studs. The beam's width will change linearly from Width0 studs at its origin (Attachment0).

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryShape
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Beam.ZOffset

The distance, in studs, the beam display is offset relative to the CurrentCamera. When 0, the beam will be displayed in its standard position between Attachment0 and Attachment1. ZOffset can be either positive or negative.

This property is particularly useful to avoid "Z‑fighting" when using multiple Beams between the same Attachments.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryAppearance
serialization{"can_load":true,"can_save":true}
capabilities["Basic"]

Code samples: View on Creator Hub (Beam-ZOffset).

Methods

NameType / ReturnsDescription
Beam:SetTextureOffset()Sets the current offset of the beam's texture cycle.

Inherited from Instance

NameType / ReturnsDescription
Instance:AddTag()Applies a tag to the instance.
Instance:childrenInstancesReturns an array of the object's children.
Instance:ClearAllChildren()This method destroys all of an instance's children.
Instance:CloneInstanceCreate a copy of an instance and all its descendants, ignoring instances that are not Archivable.
Instance:cloneInstance
Instance:Destroy()Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children.
Instance:destroy()
Instance:FindFirstAncestorInstance?Returns the first ancestor of the Instance whose Instance.Name is equal to the given name.
Instance:FindFirstAncestorOfClassInstance?Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className.
Instance:FindFirstAncestorWhichIsAInstance?Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstChildInstance?Returns the first child of the Instance found with the given name.
Instance:findFirstChildInstance
Instance:FindFirstChildOfClassInstance?Returns the first child of the Instance whose ClassName is equal to the given class name.
Instance:FindFirstChildWhichIsAInstance?Returns the first child of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstDescendantInstance?Returns the first descendant found with the given Instance.Name.
Instance:GetActorActor?Returns the Actor associated with the Instance, if any.
Instance:GetAttributeVariantReturns the value which has been assigned to the given attribute name.
Instance:GetAttributeChangedSignalRBXScriptSignalReturns an event that fires when the given attribute changes.
Instance:GetAttributesDictionaryReturns a dictionary of the instance's attributes.
Instance:GetChildrenInstancesReturns an array containing all of the instance's children.
Instance:getChildrenInstances
Instance:GetDebugIdstringReturns a coded string of the debug ID used internally by Roblox.
Instance:GetDescendantsInstancesReturns an array containing all of the descendants of the instance.
Instance:GetFullNamestringReturns a string describing the instance's ancestry.
Instance:GetStyledVariantReturns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified.
Instance:GetStyledPropertyChangedSignalRBXScriptSignalReturns an event that fires when the given style property changes on the instance.
Instance:GetTagsArrayGets an array of all tags applied to the instance.
Instance:HasTagbooleanCheck whether the instance has a given tag.
Instance:IsAncestorOfbooleanReturns true if an Instance is an ancestor of the given descendant.
Instance:IsDescendantOfbooleanReturns true if an Instance is a descendant of the given ancestor.
Instance:isDescendantOfboolean
Instance:IsPropertyModifiedbooleanReturns true if the value stored in the specified property is not equal to the code-instantiated default.
Instance:QueryDescendantsInstancesReturns an array containing all descendants of the instance that match the selector string.
Instance:Remove()Sets the object's Parent to nil, and does the same for all its descendants.
Instance:remove()
Instance:RemoveTag()Removes a tag from the instance.
Instance:ResetPropertyToDefault()Resets a property to its default value.
Instance:SetAttribute()Sets the attribute with the given name to the given value.
Instance:WaitForChildInstanceReturns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does.

Inherited from Object

NameType / ReturnsDescription
Object:GetPropertyChangedSignalRBXScriptSignalGet an event that fires when a given property of the object changes.
Object:IsAbooleanReturns true if an object's class matches or inherits from a given class.
Object:isAboolean

Beam:SetTextureOffset

The offset of a beam's texture cycle represents the progress of its texture animation. This method sets the current offset of the beam's texture cycle; hence, it can be used to reset the cycle by passing 0 as the offset parameter.

Notes

Parameters

NameTypeDefaultDescription
offsetfloat0The desired offset of the texture cycle.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["Basic"]

Events

Inherited from Instance

NameType / ReturnsDescription
Instance.AncestryChangedFires when the Instance.Parent property of this object or one of its ancestors is changed.
Instance.AttributeChangedFires whenever an attribute is changed on the Instance.
Instance.ChildAddedFires after an object is parented to this Instance.
Instance.childAdded
Instance.ChildRemovedFires after a child is removed from this Instance.
Instance.DescendantAddedFires after a descendant is added to the Instance.
Instance.DescendantRemovingFires immediately before a descendant of the Instance is removed.
Instance.DestroyingFires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy().
Instance.StyledPropertiesChangedFires whenever any style property is changed on the instance, including when a property is set to nil.

Inherited from Object

NameType / ReturnsDescription
Object.ChangedFires immediately after a property of the object changes, with some limitations.