Skip to content

Data type

NumberSequenceKeypoint

Official docs ↗

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

About NumberSequenceKeypoint

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

Constructors 2

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

Properties 3

  • Envelope: numberThe amount of variance allowed from the value.

    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: numberThe 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: numberThe 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.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.