Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Animations don't load anymore?

Asked by 3 years ago

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!

3 answers

Log in to vote
0
Answered by
ZIRFAL3 17
3 years ago

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

0
Didn't work ABCTrainerDude 12 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

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!

Log in to vote
0
Answered by 3 years ago

I fixed it, all I had to do was parent the object before the animation, I hope this helps anyone with the same problem!

0
Basically had to wait until plr loaded ABCTrainerDude 12 — 3y

Answer this question