I can't load any animations in any of my projects, I have kept getting these errors in all of my projects, it says: "LoadAnimation requires the Humanoid object (ABCTrainerDude.Humanoid) to be a descendant of the game object"
I can not figure out how to fix this, I would really appreciate if someone could help me, thanks!
You have to get a "Animation" and pur the link of your animation ID in "Animationid", then make a variable for the animation object and the humanoid of the character.Then do this:
local AnimTrack = HumanoidVariable:LoadAnimation(AnimationVariable) VariableForAnim:Play()
If you didnt understand, just open this link https://developer.roblox.com/en-us/api-reference/function/Humanoid/LoadAnimation
Do it this way, it always works for me like this.
local animation = script.Parent.Animation local loadanim = script.Parent.Humanoid:LoadAnimation(animation) loadanim:play()
the script.Parent is supposed to be the character.
Hope it worked and helped you out!
I fixed it, all I had to do was parent the object before the animation, I hope this helps anyone with the same problem!