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

Attaching HumanoidRootPart to an NPC?

Asked by
Omarstein 100
8 years ago

Hey guys! I just have a quick question and it might be straightforward or might sound dumb, but I'm trying to add animations to an NPC and I've noticed that I need to add a HumanoidRootPart and I'm unsure how to attach it... I've tried CFraming it through the torso, but that kind of broke the whole NPC. Help is much appreciated!

1 answer

Log in to vote
0
Answered by 8 years ago

HumanoidRootParts are connected to the player by a Motor6D called "RootJoint". But first, you need to do the following to the HRP:

  1. Disable CanCollide
  2. Disable Anchored
  3. Transparency to 1

Motor6Ds are pretty much the same as a weld, except that they're a joint and a few other things. They have the same Part0, Part1 thing as welds.

I wrote this in play solo, and this is a screenshot: http://prntscr.com/8n0pw5

Hope I helped :)

0
Worked great! Thanks! Do you have any idea why the arm thats holding the sword won't follow the animation in an NPC? Omarstein 100 — 8y
0
It's because when a player has a tool that moves the arm equipped, the arm is welded somehow in that position. TheDeadlyPanther 2460 — 8y
0
So there's no way around that? Omarstein 100 — 8y
0
Not that I know of, unless you script it (very hard). TheDeadlyPanther 2460 — 8y
Ad

Answer this question