Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Attaching HumanoidRootPart to an NPC?

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

✓ Accepted answer

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 :)

4 comments

0

Worked great! Thanks! Do you have any idea why the arm thats holding the sword won't follow the animation in an NPC?

0

It's because when a player has a tool that moves the arm equipped, the arm is welded somehow in that position.

0

So there's no way around that?

0

Not that I know of, unless you script it (very hard).

This discussion is preserved as it was. New answers, comments, and votes are closed.