local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID=241586474"
local animController = script.Parent.AnimationController
if script.Parent.Humanoid.Health <= 50 then
local animTrack = animController:LoadAnimation(animation)
animTrack:Play()
end
This is the script I have so far, I know how to add animations into the player but not NPCs and this script isnt working for me. I dont know if its the script thats the problem on the children of the npc. The script is a child of the NPC I also have an AnimationController and a HumanoidRootpart.
please help meh.

2 comments
I found a link in scripthelper. It might help: https://scriptinghelpers.org/questions/7655/how-do-i-create-npc-animations
Thanks for the help everyone