PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

GetPlayingAnimationTracks

This function returns an array of all AnimationTrack|AnimationTracks that are currently being played on the Humanoid.

A typical use for this function is stopping currently playing tracks using AnimationTrack/Stop.

Beware that this function will not return AnimationTrack|AnimationTracks that have loaded but are not playing. If you want to track these you will need to index them manually. See below for one example of how this could be achieved:

local animationTracks = {}
local track = humanoid:LoadAnimation(animation)
table.insert(animationTracks, track)

Returns

Return Type Summary

An array of currently playing AnimationTrack|AnimationTracks


Code Samples


Stop Playing Animations

The code below gets a list of the AnimationTrack|AnimationTracks current being played for the Players/LocalPlayer|localplayer using the Humanoid/GetPlayingAnimationTracks function. Then, the code iterates through the list and stops all of the tracks using the AnimationTrack/Stop function.