strong textThere’s a function inside Animators called “GetPlayingAnimationTracks,” which, when called, will return an array of strings.
local Animator = path.to.Animator
local playingAnimations = Animator:GetPlayingAnimationTracks -- Will return an array of strings or, in other words, a table of animations playing in that animator.
local playingAnimation = playingAnimations[1] -- This will get the first animation track in the array of strings.
Do NOT call this function on Humanoids. They deprecated this and suggest that you don’t use this for new work.