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

How would I make a small NPC?[With Animations]

Asked by 8 years ago

I am making a game and I need to have NPCs that are about 1/4 of the size of your character. When I make these and add in the Motor6D inside of them their body parts spread out, how would I prevent that? Here is a picture of what It looks like.


I tried to weld it but the animations wouldn't play because the limbs were stuck together.


Any other ideas? Thanks!

2 answers

Log in to vote
0
Answered by 8 years ago

This really isn't a scripting question, because all you need is this nifty plugin!

0
Surprisingly this works lol EzraNehemiah_TF2 3552 — 8y
0
Yesh. I use it a lot. ChemicalHex 979 — 8y
Ad
Log in to vote
4
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
8 years ago

When you resized the character, all of it's welds stayed the same. As you may know.. welds have a C0 property which defines an offset for the weld. Why is this relevant information? Because all the C0 properties of any welds in your character are staying the same! Which is causing your character to be spread out.

The syntax for offsetting a weld is;

weld.C0 = [Position offset] * [Rotation offset]

And is used like;

weld.C0 = CFrame.new(0,5,0) * CFrame.Angles(math.rad(90),0,0)

The above code would make the offset be 5 studs above, and 90 degrees on the X axis..

So what you need to do is keep any rotation offsets but manipulate the position offsets to your uses.

EDIT: This answer also is compatible with Motors

0
He...still could use the plugin ChemicalHex 979 — 8y
1
Yeah.. but you can't exactly use model resize plugin through a script .-. And he's wanting to resize his character.. Goulstem 8144 — 8y
0
I didn't resize the model, I made the person by scratch. I am using a Motor6D instead of a Weld. EzraNehemiah_TF2 3552 — 8y
0
Ehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh............. idk............. Goulstem 8144 — 8y
0
I don't know either, that's why I'm asking you. lol EzraNehemiah_TF2 3552 — 8y

Answer this question