I am trying to make an NPC with a sword preform a slash animation when attacking. How would I make the animation execute? The same way for a regular player?
CFraming would be laggy, i would just use the plugin roblox made.
http://wiki.roblox.com/index.php?title=Animations
I'm not to sure about how you would execute the animation on an NPC.
If you want to make a slash animation then you will have to play the animation by playing an animation track of it on the humanoid. If your game is filtering enabled then you may have to use remote events to accomplish this.
Documentation on this subject can be found here
If you want to replace default character walk, jump, fall etc. then you will have to change some variables in the characters 'animate' script.
Documentation on this subject can be found here
Finally if you want to play animations in NPCs (Non-Player Characters) then you will have to also play animation tracks on the NPC's humanoid and add extra motors and more.