NumberSequence

The NumberSequence data type represents a sequence of numbers. NumberSequence is most commonly used in effect classes such as and . The NumberSequenceKeypoint data type is used to construct complex NumberSequence values.
:
local sequence = NumberSequence.new{
 -- NumberSequenceKeypoint.new(time, value)
 NumberSequenceKeypoint.new(0, 1), -- start
 NumberSequenceKeypoint.new(0.25, 0.5),
 NumberSequenceKeypoint.new(0.5, 0.25),
 NumberSequenceKeypoint.new(0.75, 0.125),
 NumberSequenceKeypoint.new(1, 0), -- end
}
== NumberSequence ==
=== Constructors ===
;NumberSequence.new(n: )
:Returns a NumberSequence with the start and end values set to n.
;NumberSequence.new(n0: , n1: )
:Returns a NumberSequence with n0 as the start value and n1 as the end value.
;NumberSequence.new(Keypoints: { })
:Returns a NumberSequence from an array of two or more NumberSequenceKeypoint values, which must be in an ascending time value order.
=== Properties ===
;Keypoints 
:An array of NumberSequenceKeypoint values in an ascending time value order.
== NumberSequenceKeypoint ==
NumberSequenceKeypoint represents two number values: time (from 0 to 1) and value. The additional third value is used as the size of the value's envelope representing the amount of variance from the value. These values form a keypoint used in complex NumberSequence values.
=== Constructors ===
;NumberSequenceKeypoint.new(time: , value: )
:Returns a keypoint with the specified time and value.
;NumberSequenceKeypoint.new(time: , value: , envelope: )
:Returns a keypoint with the specified time, value and envelope.
=== Properties ===
;Envelope 
:The amount of variance allowed from the value of the keypoint.
;Time 
:The relative time at which the keypoint is positioned (from 0 to 1). 0 represents the start value (first) while 1 represents the end value (last).
;Value 
:The value of the keypoint.
== Referenced by ==
Category:Roblox types
Category:Reference types