Beam
Beam : Instance
Properties
Color
ColorSequence
The color of the beam is determined by a ColorSequence
that defines a gradient of colors along the length of the beam.
Code Samples
local Beam = script.Parent
Beam.Color = ColorSequence.new(Color3.fromRGB(255, 0, 0))
Enabled
bool
Determines whether the beam is visible (true
) or not (false
).
Code Samples
local Beam = script.Parent
Beam.Enabled = false
ColorTexture
string
The texture to apply to the beam's color channel. This should be a valid asset ID or URL.
Code Samples
local Beam = script.Parent
Beam.ColorTexture = "ovdrassetid://1234"
ColorTextureLength
number
Defines the length of the applied color texture. A smaller value repeats the texture more frequently.
Code Samples
local Beam = script.Parent
Beam.ColorTextureLength = 10
ColorTextureSpeed
number
Specifies the speed at which the color texture scrolls along the beam.
Code Samples
local Beam = script.Parent
Beam.ColorTextureSpeed = 5
AlphaTexture
string
The texture applied to define the beam's transparency. This should also be a valid asset ID or URL.
Code Samples
local Beam = script.Parent
Beam.AlphaTexture = "ovdrassetid://1234"
AlphaTextureLength
number
Defines the length of the applied alpha texture. Adjusts the scaling for transparency effects.
Code Samples
local Beam = script.Parent
Beam.AlphaTextureLength = 10
AlphaTextureSpeed
number
Controls the speed at which the alpha texture scrolls along the beam.
Code Samples
Transparency
NumberSequence
Defines the transparency of the beam at different points along its length using a NumberSequence
.
Code Samples
local Beam = script.Parent
Beam.Transparency = NumberSequence.new(0.5)
Attachment0
Attachment
The starting attachment of the beam. This determines one end of the beam's position.
Code Samples
local Beam = script.Parent
local Workspace = game:GetService("Workspace")
local Part = Workspace:WaitForChild("Part")
local Attachment0 = Part:WaitForChild("Attachment0")
Beam.Attachment0 = Attachment0
Attachment1
Attachment
The ending attachment of the beam. This determines the other end of the beam's position.
Code Samples
local Beam = script.Parent
local Workspace = game:GetService("Workspace")
local Part = Workspace:WaitForChild("Part")
local Attachment1 = Part:WaitForChild("Attachment1")
Beam.Attachment1 = Attachment1
StartCurve
Vector3
Defines the curve at the start of the beam to create a bend or arc from the first attachment.
Code Samples
local Beam = script.Parent
Beam.StartCurve = Vector3.new(0, 0, 2)
EndCurve
Vector3
Defines the curve at the end of the beam to create a bend or arc near the second attachment.
Code Samples
local Beam = script.Parent
Beam.EndCurve = Vector3.new(0, 0, -2)
Segments
number
The number of segments used to render the beam. More segments create a smoother appearance, but require more performance.
Code Samples
Width0
number
Width of the beam at the start, relative to the first attachment.
Code Samples
local Beam = script.Parent
Beam.Width0 = 10
Width1
number
Width of the beam at the end, relative to the second attachment.
Code Samples
local Beam = script.Parent
Beam.Width1 = 10
FacingVector
Vector3
Defines the vector that represents the direction the beam faces.
Code Samples
local Beam = script.Parent
Beam.FacingVector = Vector3.new(1, 1, 0)
Methods
Events
Last updated