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)

4 comments
When loading the animation, it has to be loaded into the humanoid.
@Xoqex With the exception of non-player characters. http://wiki.roblox.com/index.php?title=AnimationController
What's the "Animation" object's class name?
Animation