Play is not a valid member of Animation "Workspace.Dede_4242.Animate.SwordEquip"

It’s growing another error now:
“LoadAnimation requires an Animation object”

You need to specify the animation! What does your script look like?

Just call LoadAnimation() on the humanoid with an animation then play it

I can provide it in 15 minutes I think

(Also very thanks for helping me, you’re my hero)

Well, the script itself should work completely fine, it is most likely an error on your end. Could you specify more about what the error looks like?

Sorry for the late reply, I was very busy, anyway, the line taht errors is:

local equipAnimation = animator:LoadAnimation(animator, animator:WaitForChild(“SwordEquip”))

Yes I already defined the Animator and I’m sure it’s right, error:

LoadAnimation requires an Animation object

It is because, as far as I know, the animation is not located inside the animator objetc but the animate script? Atleast that is what I was able to see from your previous script

If you are using animator:LoadAnimation() you don’t need to give it the animator object as the first parameter, that is just needed if you use the short replacement I used on my example, you just need to do animator:LoadAnimation(animate.SwordEquip), making sure you make a reference for the animate script before loading the animation.

Oh okay, I’ll try that, also I modified the animation spawn script to make them spawn under the animator

Thanks so much it worked out!
Marked as solution

I’ve been having this issue for days an snow is finally solved!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.