Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I make a script without Humanoid:LoadAnimation?

I decided to use this script:

local animation = script:WaitForChild('Animation')
local humanoid = script.Parent:WaitForChild('Humanoid')
local dance = humanoid:LoadAnimation(animation)
dance:Play()

But It didn't worked, I was wondering why and founded out that Humanoid:LoadAnimation will not work anymore... And I need help, how do I make an script that does an custom animation I made without It?

1 answer

✓ Accepted answer

There is something that was replacing Humanoid for :LoadAnimation method. It is called Animator. Animator uses :LoadAnimation now. So instead of doing the method you used, you should do this:

local animation = -- your animation
local humanoid = script.Parent:WaitForChild("Humanoid")
local dance = humanoid:WaitForChild("Animator"):LoadAnimation(animation)
dance:Play()

1 comment

0

Also, Animator is located as a Descendant of the Humanoid, so thats why I used :WaitForChild

This discussion is preserved as it was. New answers, comments, and votes are closed.