How do I make an NPC play an idle animation?

I’m writing a script to make an NPC do an idle animation, but since I’m new to scripting, I don’t know how, can anyone show me how to do it, here’s the current script I have:

1 Like

You have to load each individual animation in using the npc’s animator (Note that the script will vary depending on where the npc is and what it is called)

local animation = workspace.NPC.Humanoid.Animator:LoadAnimation(idle)