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

Humanoid:MoveTo() has trouble with high speed NPCs?

Asked by 2 years ago

I was testing Humanoid:MoveTo() on NPCs and it was working just fine with normal and slow speed NPCs. However, if I set the walkspeed of the NPC to a high number it runs around crazy. It hits the waypoints all right, but it's too fast that it slides around like ice physics. Is there any way to make it slower or maybe an alternative to Humanoid:MoveTo()?

Any help is appreciated. Thanks!

2 answers

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

You could try to turn up the Friction property of the NPC's leg parts. The Friction property can be set under the Custom Physical Properties tab which all baseparts have.

You could also try to set the massless property of all parts of the humanoid to true, as then the humanoid could accelerate instantly. You can also just change the density property of all parts to a value where the NPC doesn't slide around too much, this property can also be found under Custom Physical Properties

I haven't tried these out but I'm quite sure they should work. Keep in mind that both of these solutions might have some side effects, IE; the NPC could be pushed around with very little force. Or the friction might have unintended consequences to gameplay.

0
Thank you! Setting the density to 10 did the trick for me! MarTieMak 56 — 2y
Ad
Log in to vote
0
Answered by 2 years ago

All characters have something called Humanoid. This humanoid determines some factors like seat location, speed, jumppower and all that sort of stuff. What is happening is the NPC's walkspeed is set to something very high or very low.

Answer this question