PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

AnimationTrack

Show deprecated

AnimationTrack

Show deprecated

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

Properties

Animation

Animation

[ReadOnly] [NotReplicated]

The Animation object that was used to create this AnimationTrack.

bool

IsPlaying

[ReadOnly] [NotReplicated]

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

float

Length

[ReadOnly] [NotReplicated]

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

Looped

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

Priority

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

Speed

[ReadOnly] [NotReplicated]

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

TimePosition

[NotReplicated]

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

[ReadOnly] [NotReplicated]

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

float

WeightTarget

[ReadOnly] [NotReplicated]

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.

Functions

void

AdjustSpeed ( float speed )

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

AdjustWeight ( float weight , float fadeTime )

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

RBXScriptSignal

GetMarkerReachedSignal ( string name )

This function returns an DataType/RBXScriptSignal|event that fires when a specified KeyframeMarker has been hit in an Animation|animation

double

GetTimeOfKeyframe ( string keyframeName )

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

void

Play ( float fadeTime , float weight , float speed )

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

void

Stop ( float fadeTime )

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.

Events

RBXScriptSignal

DidLoop ( )

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

RBXScriptSignal

KeyframeReached ( string keyframeName )

[Deprecated]

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

RBXScriptSignal

Stopped ( )

Fires whenever the AnimationTrack finishes playing.