Skip to content

NumberSequenceKeypoint

Supported Datatype

Represents keypoint within a NumberSequence with a particular time, value, and envelope size.

Description

The NumberSequenceKeypoint data type represents keypoints within a NumberSequence with a particular time, value, and envelope size.

Constructors

new Supported Returns a keypoint with the specified time and value.
NumberSequenceKeypoint.new(time: number, value: number)

Returns a keypoint with the specified time and value.

Returns a NumberSequenceKeypoint with the given time and value, with Envelope defaulting to 0 (no random variance). The time parameter should be a number between 0 and 1, and value can be any number.

new Supported Returns a keypoint with the specified time, value, and envelope.
NumberSequenceKeypoint.new(time: number, value: number, envelope: number)

Returns a keypoint with the specified time, value, and envelope.

Returns a NumberSequenceKeypoint with the given time, value, and envelope. The envelope parameter must be a non-negative number that defines the amount of random variance applied to value at runtime; the actual output for this keypoint is chosen randomly within [value − envelope, value + envelope].

Properties

Envelope Supported The amount of variance allowed from the value.
NumberSequenceKeypoint.Envelope()

The amount of variance allowed from the value. For example, a value of 0.5 with an envelope of 0.1 could compute to between 0.4 and 0.6 at runtime. The most common use case for this property is to randomize the size of particles (within the envelope) from a ParticleEmitter.

Time Supported The relative time at which the keypoint is positioned.
NumberSequenceKeypoint.Time()

The relative time at which the keypoint is positioned.

The relative time at which this keypoint is positioned within the parent NumberSequence, expressed as a number from 0 to 1 where 0 is the beginning of the sequence and 1 is the end. Within a NumberSequence, the first keypoint must have a time of 0 and the last keypoint must have a time of 1; any intermediate keypoints must be in ascending time order. The engine linearly interpolates values and envelopes between consecutive keypoints based on their time positions. Defaults to 0.

Value Supported The base value of the keypoint.
NumberSequenceKeypoint.Value()

The base value of the keypoint.

The base numeric value at this keypoint's position in the sequence. When the engine evaluates a NumberSequence, it linearly interpolates between adjacent keypoints' values based on time. If Envelope is greater than 0, the actual output at runtime may vary randomly within the range [Value − Envelope, Value + Envelope]. Defaults to 0.

Nova binding inventory

Library Members
new Envelope, Time, Value

Roblox reference: NumberSequenceKeypoint