A properly coded NPC will not lag, unless you have hundreds of them.
If you do: In your FindNearestTorso do not search the entire workspace. Just search the Players for the closest Player. And change the wait() in the MoveTo part to wait(.5) or wait(1). The NPC does not need to recalculate his direction every .03 of a second (wait()).
|