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

how do i properly use animation controller?

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

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

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