Skip to content
Roblox API Reference

AnimationTrack

Controls the playback of an animation on an Animator.
  • Not creatable
Memory category
Animation
Own members
30
Inherited members
75
Subclasses
0
Siblings
608

Properties32

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Defined byAnimationTrack9

Property categoryData

  • AnimationTrack.Animation: Animation
    The Animation object that was used to create this AnimationTrack.
    • Read only
    • Read capabilities: Animation
  • AnimationTrack.IsPlaying: boolean
    A read-only property that returns true when the AnimationTrack is playing.
    • Read only
    • Read capabilities: Animation
    • Simulation access
  • AnimationTrack.Length: number
    A read-only property that returns the length (in seconds) of an AnimationTrack. This will return 0 until the animation has fully loaded and thus may not be immediately available.
    • Read only
    • Read capabilities: Animation
  • AnimationTrack.Looped: boolean
    Sets whether the animation will repeat after finishing. If it is changed while playing the result will take effect after the animation finishes.
    • Read capabilities: Animation
    • Simulation access
  • AnimationTrack.Priority: Enum.AnimationPriority
    Sets the priority of an AnimationTrack. Depending on what this is set to, playing multiple animations at once will look to this property to figure out which KeyframePoses should be played over one another.
    • Read capabilities: Animation
    • Simulation access
  • AnimationTrack.Speed: number
    Read-only property that gives the current playback speed of the AnimationTrack.
    • Read only
    • Read capabilities: Animation
    • Simulation access
  • AnimationTrack.TimePosition: number
    Returns the position in time in seconds that an AnimationTrack is through playing its source animation. Can be set to make the track jump to a specific moment in the animation.
    • Not replicated
    • Read capabilities: Animation
    • Load only
    • Simulation access
  • AnimationTrack.WeightCurrent: number
    Read-only property that gives the current weight of the AnimationTrack.
    • Read only
    • Read capabilities: Animation
    • Simulation access
  • AnimationTrack.WeightTarget: number
    Read-only property that gives the current weight of the AnimationTrack.
    • Read only
    • Read capabilities: Animation
    • Simulation access

Methods58

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 byAnimationTrack16
  • AnimationTrack:AdjustSpeed(speed: number? = 1)
    Changes the AnimationTrack.Speed of an animation. A positive value for speed plays the animation forward, a negative one plays it backwards, and 0 pauses it.
    • Custom Lua state
    • Capabilities: Animation
    • Simulation access
    Parameters
    ParameterDescription
    speed: number? = 1
    The playback speed the animation is to be changed to.
  • AnimationTrack:AdjustWeight(weight: number? = 1,fadeTime: number? = 0.100000001,)
    Changes the weight of an animation, with the optional fadeTime parameter determining how long it takes for AnimationTrack.WeightCurrent to reach AnimationTrack.WeightTarget.
    • Custom Lua state
    • Capabilities: Animation
    • Simulation access
    Parameters
    ParameterDescription
    weight: number? = 1
    The weight the animation is to be changed to.
    fadeTime: number? = 0.100000001
    The duration of time that the animation will fade between the old weight and the new weight for.
  • AnimationTrack:GetDebugData(): { [string]: any }
    • Roblox script security
    • Capabilities: Animation
  • AnimationTrack:GetMarkerReachedSignal(name: string): RBXScriptSignal
    Returns an RBXScriptSignal (event) that fires when a specified KeyframeMarker has been hit in an animation.
    • Capabilities: Animation
    Parameters
    ParameterDescription
    name: string
    The name of the KeyframeMarker the signal is being created for. Not to be confused with the name of the Keyframe.
    Returns
    TypeDescription
    RBXScriptSignal
    The signal created and fired when the animation reaches the created KeyframeMarker.
  • AnimationTrack:GetParameter(key: string): any
    Returns the value of a parameter on the animation graph by key. Returns nil if the parameter has not been set.
    • Capabilities: Animation
    • Simulation access
    Parameters
    ParameterDescription
    key: string
    The name of the parameter to retrieve.
    Returns
    TypeDescription
    any
    The current value of the parameter, or nil if not set.
  • AnimationTrack:GetParameterDefaults(): { [string]: any }
    Returns a dictionary of parameter values initially set as instance attributes on the AnimationGraphDefinition instance used to build the animation graph inside this track.
    • Capabilities: Animation
    Returns
    TypeDescription
    { [string]: any }
    A dictionary mapping parameter names to their default values. Returns an empty dictionary if the animation is not an animation graph.
  • AnimationTrack:GetTargetInstance(name: string): Instance
    • Capabilities: Animation
    Parameters
    Parameter
    name: string
    Returns
    Type
    Instance
  • AnimationTrack:GetTargetNames(): { any }
    • Capabilities: Animation
    Returns
    Type
    { any }
  • AnimationTrack:GetTimeOfKeyframe(keyframeName: string): number
    Returns the time position of the first Keyframe of the given name in an AnimationTrack.
    • Capabilities: Animation
    Parameters
    ParameterDescription
    keyframeName: string
    The name associated with the Keyframe to be found.
    Returns
    TypeDescription
    number
    The time, in seconds, the Keyframe occurs at normal playback speed.
  • AnimationTrack:Play(fadeTime: number? = 0.100000001,weight: number? = 1,speed: number? = 1,)
    Plays the AnimationTrack. Once called an AnimationTrack will play with the specified fadeTime, weight and speed.
    • Custom Lua state
    • Capabilities: Animation
    • Simulation access
    Parameters
    ParameterDescription
    fadeTime: number? = 0.100000001
    The duration of time that the animation's weight should be faded in for.
    weight: number? = 1
    The weight the animation is to be played at.
    speed: number? = 1
    The playback speed of the animation.
  • AnimationTrack:ResetGraph()
    • Roblox script security
    • Capabilities: Animation
  • AnimationTrack:SetParameter(key: string, value: any)
    Sets a parameter value on the animation graph, driving animation graph node inputs.
    • Capabilities: Animation
    • Simulation access
    Parameters
    ParameterDescription
    key: string
    The name of the parameter to set.
    value: any
    The value to assign to the parameter. Non-finite numeric values are sanitized to 0.
  • AnimationTrack:SetTargetInstance(name: string, target: Instance)
    • Capabilities: Animation
    Parameters
    Parameter
    name: string
    target: Instance
  • AnimationTrack:Stop(fadeTime: number? = 0.100000001)
    Stops the AnimationTrack.
    • Custom Lua state
    • Capabilities: Animation
    • Simulation access
    Parameters
    ParameterDescription
    fadeTime: number? = 0.100000001
    The time, in seconds, for which animation weight is to be faded out over.
  • AnimationTrack:UpdateGraphNodeDefinition(nodeId: string,nodeDefinition: Instance,): boolean
    • Roblox script security
    • Capabilities: Animation
    Parameters
    Parameter
    nodeId: string
    nodeDefinition: Instance
    Returns
    Type
    boolean
  • AnimationTrack:UpdateGraphNodeProperty(nodeId: string,propertyName: string,value: any,inputPinName: string? = "",): boolean
    • Roblox script security
    • Capabilities: Animation
    Parameters
    Parameter
    nodeId: string
    propertyName: string
    value: any
    inputPinName: string? = ""
    Returns
    Type
    boolean

Events15

Inherited fromObject1
Inherited fromInstance9
Defined byAnimationTrack5
  • AnimationTrack.DidLoop: RBXScriptSignal<()>
    Fires when an AnimationTrack loops on the next update following the end of the previous animation loop.
    • Capabilities: Animation
  • AnimationTrack.Ended: RBXScriptSignal<()>
    Fires when the AnimationTrack is completely done moving anything in the world.
    • Capabilities: Animation
  • AnimationTrack.KeyframeReached: RBXScriptSignal<(keyframeName: string)>
    Fires every time playback of an AnimationTrack reaches a Keyframe that does not have the default name of Keyframe.
    • Capabilities: Animation
    Parameters
    Parameter
    keyframeName: string
  • AnimationTrack.ParameterChanged: RBXScriptSignal<(key: string, value: any)>
    • Roblox script security
    • Capabilities: Animation
    Parameters
    Parameter
    key: string
    value: any
  • AnimationTrack.Stopped: RBXScriptSignal<()>
    Fires when the AnimationTrack finishes playing. The AnimationTrack might still animate the subject while the animation "fades out". To catch when the AnimationTrack is completely done moving anything in the world, use the AnimationTrack.Ended event.
    • Capabilities: Animation