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

AnimationController is not running my Animation?

Asked by
Drogb4 15
9 years ago

I've been trying to run an animation inside an AI and it just won't work, even after following the instructions of the wiki and besides that I can't anything that will help. Please help me out The only output is: "Argument error: must be an Animation object"

AnimController = script.Parent.AnimationController
Animation = script.Parent.Animation
AnimTrack = AnimController:LoadAnimation(Animation)
Debounce = false

function Anim()
    if not Debounce then
        Debounce = true
        wait(1)
        AnimTrack:Play()
        wait(1)
        Debounce = false
    end
end

script.Parent.Torso.Touched:connect(Anim)

0
When loading the animation, it has to be loaded into the humanoid. Xoqex 75 — 9y
0
@Xoqex With the exception of non-player characters. http://wiki.roblox.com/index.php?title=AnimationController Redbullusa 1580 — 9y
0
What's the "Animation" object's class name? Redbullusa 1580 — 9y
0
Animation Drogb4 15 — 9y

Answer this question