Type Checking Humanoid gives incorrect Deprecated warning on :LoadAnimation()

When type checking a Humanoid variable to Humanoid, it will improperly flag Humanoid:LoadAnimation() as deprecated and suggest that you change it to what it already is

Screenshot of the code without type checking to Humanoid:

Screenshot of the code with type checking to Humanoid:

Expected behavior

The warning for Humanoid:LoadAnimation() should not be appearing, and it should not appear as a warning in my Script Analysis window as a DeprecatedApi:

1 Like

Humanoid:LoadAnimation() is deprecated, the recommended alternative is Animator:LoadAnimation(). I guess the warning just isn’t saying the “Animator” part.

2 Likes

This was deprecated, it isn’t a bug.

Instead, use:

 local animationTrack = humanoid:LoadAnimation(animation)
animationTrack:Play()

It’s still telling me to use the exact same function that I am already using, the error is bugged

you’re supposed to use the Animator object to load animations

local Animator = Humanoid:FindFirstChildWhichIsA("Animator")
local AnimationTrack = Animator:LoadAnimation(Animation)

the warning is trying to show that you need to use the animator object’s LoadAnimation function but it fails to do so lol

4 Likes

Thank you for the report, we will fix the warning message to include the target class name (Animator).

1 Like

This issue has been resolved .

1 Like