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

How to move NPC's without Humanoids?

Asked by 6 years ago

I'm trying to make a walking NPC without humanoid. I can't figure out how to move them, what body mover to use?

0
Why dont you just use a humanoid? It would probably make whatever your working on be much easier :p Nikkulaos 229 — 6y
0
I plan on having a lot of NPCs, last time I checked Humanoid was GPU expensive and would lag. airassassin99 0 — 6y
0
It is? hiimgoodpack 2009 — 6y
0
Yes, big games like Theme Park Tycoon and Retail Tycoon don't use Humanoids for that exact reason. airassassin99 0 — 6y
0
Humanoids almost definitely don't run on the GPU. I really think whatever you're trying to accomplish is going to be easier/more efficient with Humanoids. Otherwise, I guess you could try to use BodyVelocity with a MaxForce of (1000, 0, 1000) or something so it doesn't affect the Y movement. Then just set the root's velocity directly for jumps? nicemike40 486 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Body Movers are not going to be faster than using a humanoid. Body movers ask the physics engine to do a bunch of extra calculations, when what you really want is to just continuously update the parts of the humanoid to go where you want. You might want to use either http://wiki.roblox.com/index.php?title=API:Class/AnimationController or do the animation entirely yourself using CFrames (in either case the parts should be anchored with CanCollide = false, if possible -- though I'm not sure if animations can be applied to anchored parts).

You can do a number of other optimizations, like making far away NPCs not animate and/or use simpler models. It may be a good idea to make the NPCs local -- that is, the server will keep track of the positions of the NPCs and keep the clients up to date on them, but it won't have the actual NPC models.

Ad

Answer this question