We use cookies on this site to enhance your user experience

AnimationTrack

AnimationTrack

Controls the playback of an animation on a Humanoid or AnimationController.
This object cannot be created, rather it is returned by the LoadAnimation method.


Properties

Name Type Description
Animation

The Animation object that was used to create this AnimationTrack.

bool

A read only property that returns true when the AnimationTrack is playing.

float

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.

bool

This property sets whether the animation will repeat after finishing. If it is changed while playing the result will take effect after the animation finishes.

AnimationPriority

This property 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 Keyframe Poses should be played over one another.

float

The Speed of an AnimationTrack is a read only property that gives the current playback speed of the AnimationTrack. This has a default value of 1. When speed is equal to 1, the amount of time an animation takes to complete is equal to AnimationTrack/Length (in seconds).

float

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.

float

WeightCurrent is a read-only property that gives the current weight of the AnimationTrack. It has a default value of 1.

float

WeightCurrent is a read-only property that gives the current weight of the AnimationTrack. It has a default value of 1 and is set when AnimationTrack/Play, AnimationTrack/Stop or AnimationTrack/AdjustWeight is called.

Inherited from Instance

Archivable ClassName DataCost Name Parent RobloxLocked

Functions

Name Type Description
void

This function 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.

void

Changes the weight of an animation, with the optional fadeTime parameter determining how long it takes for AnimationTrack/WeightCurrent to reach AnimationTrack/WeightTarget.

double

Returns the time position of the first Keyframe of the given name in an AnimationTrack.

void

Plays the AnimationTrack. Once called an AnimationTrack will play with the specified fadeTime, weight and speed.

void

Stops the AnimationTrack. Once called playback of the AnimationTrack will stop and the weight of the animation will move towards zero over a length of time specified by the optional fadeTime parameter.

Inherited from Instance

ClearAllChildren Clone Destroy FindFirstAncestor FindFirstAncestorOfClass FindFirstAncestorWhichIsA FindFirstChild FindFirstChildOfClass FindFirstChildWhichIsA GetChildren GetDebugId GetDescendants GetFullName GetPropertyChangedSignal IsA IsAncestorOf IsDescendantOf WaitForChild

Events

Name Type Description

This event fires when an AnimationTrack loops on the next update following the end of the previous animation loop.

Fires every time playback of an AnimationTrack reaches a Keyframe that does not have the default name - “Keyframe”.

Fires whenever the AnimationTrack finishes playing.

Inherited from Instance

AncestryChanged Changed ChildAdded ChildRemoved DescendantAdded DescendantRemoving