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

Add animations to my NPC? [STILL UNANSWERED]

Asked by
neoG457 315 Moderation Voter
9 years ago

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.

1
I found a link in scripthelper. It might help: https://scriptinghelpers.org/questions/7655/how-do-i-create-npc-animations RobotChitti 167 — 9y
0
Thanks for the help everyone neoG457 315 — 9y

2 answers

Log in to vote
1
Answered by
Dr_Doge 100
9 years ago

Heres a good video about all of this...

https://www.youtube.com/watch?v=aFJADlSyRrQ

I hope that helped. PeasPod is good with Roblox scripting tutorials...

0
I already now how to run it in players I want to know how to run it in NPC neoG457 315 — 9y
Ad
Log in to vote
2
Answered by 9 years ago

A list of things you want to make sure of when creating an NPC with Animations:

  1. There is a humanoid (And check if there's an Animator inside the humanoid, I'm not sure if that changes anything)

  2. The Animations are loaded into the humanoid (If it still doesn't work after referring to this, load the animations to the Animator in the Humanoid)

  3. In the Torso, there are 5 Motor6Ds. Left Hip, Left Shoulder, Neck, Right Hip, and Right Shoulder. - You may have this one wrong.

  4. There is a humanoidRootPart.

  5. The Animation you are playing is owned by you.

  6. The Animation you are playing isn't being overrun by another animation (This refers to the priority)

Answer this question