Skip to content
Roblox API Reference

FloatCurve

A sorted list of time-value pairs that define a curve. Used to animate a single numerical value.
Memory category
Instances
Own members
9
Inherited members
75
Subclasses
0
Siblings
608

Properties25

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Defined byFloatCurve2

Property categoryData

  • FloatCurve.Length: number = 0
    Number of keys in the float curve.
    • Read only
    • Read capabilities: Basic
    • Save only
  • FloatCurve.ValuesAndTimes: string = "\u0002"
    • Hidden
    • Not scriptable
    • Read capabilities: Basic

Methods49

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byFloatCurve7
  • FloatCurve:GetKeyAtIndex(index: number): FloatCurveKey
    Returns a copy of a key at a given index.
    • Capabilities: Basic
    Parameters
    ParameterDescription
    index: number
    One-based index of the key to retrieve.
    Returns
    TypeDescription
    FloatCurveKey
    Copy of the FloatCurveKey stored at index.
  • FloatCurve:GetKeyIndicesAtTime(time: number): { any }
    Returns the index of the last and first key of a period of time.
    • Capabilities: Basic
    Parameters
    ParameterDescription
    time: number
    Time value to locate within the curve's sorted keys.
    Returns
    TypeDescription
    { any }
    Array of two one-based indices that bracket time: the last key at or before time and the first key at or after it.
  • FloatCurve:GetKeys(): { any }
    Returns a copy of all the keys in the FloatCurve as a Luau array of FloatCurveKeys.
    • Capabilities: Basic
    Returns
    TypeDescription
    { any }
    Array of FloatCurveKeys.
  • FloatCurve:GetValueAtTime(time: number): number?
    Samples the float curve at a given time passed as argument.
    • Capabilities: Basic
    Parameters
    ParameterDescription
    time: number
    Time at which to sample the curve.
    Returns
    TypeDescription
    number?
    Value of the curve at the requested time.
  • FloatCurve:InsertKey(key: FloatCurveKey): { any }
    Adds the key passed as an argument to this curve. If a key at the same time is found, it will be replaced.
    • Capabilities: Basic
    Parameters
    ParameterDescription
    key: FloatCurveKey
    FloatCurveKey to insert.
    Returns
    TypeDescription
    { any }
    (see description) .
  • FloatCurve:RemoveKeyAtIndex(startingIndex: number, count: number? = 1): number
    Removes a given number of keys starting from a given index.
    • Capabilities: Basic
    Parameters
    ParameterDescription
    startingIndex: number
    Starting index from which to remove keys.
    count: number? = 1
    Number of keys to remove.
    Returns
    TypeDescription
    number
    Number of keys removed.
  • FloatCurve:SetKeys(keys: { any }): number
    Resets this curve's keys using the FloatCurveKey array passed as an argument.
    • Capabilities: Basic
    Parameters
    ParameterDescription
    keys: { any }
    Array of FloatCurveKeys.
    Returns
    TypeDescription
    number
    Number of keys inserted.

Events10

Inherited fromObject1
Inherited fromInstance9