NumberSequenceKeypoint

Constructors

NameDescription
new(time: number, value: number)Creates a keypoint at the given time with the given value. Envelope defaults to 0, meaning no random variance.
new(time: number, value: number, envelope: number)Creates a keypoint at the given time with the given value and envelope. envelope must be a non-negative number and defines the amount of random variance applied to value at runtime.

Code Snippet

local emitter = Instance.new("ParticleEmitter")
emitter.Size = NumberSequence.new({
    NumberSequenceKeypoint.new(0, 0),
    NumberSequenceKeypoint.new(0.5, 2, 0.5),
    NumberSequenceKeypoint.new(1, 0)
})
emitter.Parent = workspace.Part

Properties

NameTypeDescription
TimenumberThe relative time at which this keypoint is positioned within the parent NumberSequence, expressed as a number from 0 to 1. The first keypoint must be 0 and the last must be 1.
ValuenumberThe base numeric value at this keypoint's position in the sequence. The engine interpolates linearly between adjacent keypoint values based on time.
EnvelopenumberThe amount of variance allowed from the value. Commonly used to randomize things like particle sizes within a range.