NumberSequence

Constructors

NameDescription
new(n: number)Returns a NumberSequence with the start and end values both set to n.
new(n0: number, n1: number)Returns a NumberSequence of two keypoints, with n0 as the start value (time 0) and n1 as the end value (time 1).
new(Keypoints: Array)Returns a NumberSequence built from an array of NumberSequenceKeypoint values. The keypoints must be given in non-descending time order, must start at time 0 and end at time 1, and the array can contain at most 20 keypoints.

Code Snippet

local beam = Instance.new("Beam")
beam.Transparency = NumberSequence.new({
    NumberSequenceKeypoint.new(0, 0),
    NumberSequenceKeypoint.new(0.5, 0.5, 0.25),
    NumberSequenceKeypoint.new(1, 1)
})

Properties

NameTypeDescription
KeypointsArrayAn array containing the NumberSequenceKeypoint values that make up the NumberSequence, in ascending time order.