As a Roblox developer, it is currently impossible to get the loaded animation tracks for a humanoid which are not playing.
If Roblox is able to address this issue, it would improve my development experience because I would easily be able to get an array of the humanoid’s loaded animations without having to previously set these as variables.
Current code:
local PlayingAnimations = this.Humanoid:GetPlayingAnimationTracks()
for _,track in pairs(PlayingAnimations) do
if track.Name == "RunAnim" then
warn("Running already...")
return
end
end
local runAnim = this.Humanoid:LoadAnimation(Animations.run.RunAnim)
runAnim:Play()
Code with new feature might look like:
local LoadedAnimations = this.Humanoid:GetLoadedAnimationTracks()
if LoadedAnimations.RunAnim.IsPlaying then
warn("Running already...")
return
end
LoadedAnimations.RunAnim:Play()