Is there an alternative way of making NPC follow player(s)?

Heyo guys.

I’m here to get your guys idea on making NPC follow players.

Currently, I tried experimenting with pathfinding but find it very costly and reduce performance when there are lot of NPC around.

Using normal findTorso/findHumanoidRootPart method is viable, but doesn’t allow realism since most of the time the NPC can just get stuck behind the wall(s).

I’m looking for a simple but efficient way of doing this since most of the time my game will have 80 ~ 120 NPC/Enemies roaming around.

Should I use raycast and findTorso/findHumanoidRootPart method to achieve this?
Greatly appreciate your ideas and opinions.

1 Like

The roblox pathfinding service is a lot better than you think. And because it is written in C rather than luau, it will run faster and better than anything scripted manually.
The main bottleneck usually results from the humanoid object, rather than pathfinding.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.