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

how do i properly use animation controller?

Asked by
Jumbuu 110
7 years ago
local self = script.Parent
local animationController = self:WaitForChild'AnimationController'
local walkAnim = self:WaitForChild'Animation'
local doit = animationController:LoadAnimation(walkAnim)
doit:Play()

when i run this in game, no animations play, i even ran a print after to make sure there wasnt any bugs but the print ran successfully im using an animation controller because when i load an animation into the humanoid, it works perfectly fine in play solo but when i test on the officiaal game, the animations do not play? what can i do to fix my animation issues?

1 answer

Log in to vote
0
Answered by
guiraz 25
7 years ago

Hey man, you need to use a humanoid to activate the animation, i'll show the basics:

local humanoid =  character:WaitForChild("Humanoid")--you need to specify the humanoid of the character you want to animate

local animation = character:WaitForChild("Animation") --get the animation you want to play

local animation_track = hum:LoadAnimation(animation) --load the animation into the humanoid's animation track

animation_track:Play() --play the animation

Hope I helped! Good luck man

Ad

Answer this question