How much script activity should be called "appropiate" for a multiple AI controller?

  • What I’ve done

I’ve created an object orientated AI controller, and to test out how much it could handle I’ve decided to spawn in 10 NPCs that follow a specific dummy. I tried to refrain from using wait(x) or FindFirstChild(x) since I have a logic function on a constant loop until the AI that’s following the dummy is dead.


I know that Path:ComputeAsync() is quite expensive(CPU wise) although I have to keep computing a path to it every time the dummy the bots are chasing moves 10 studs from its previous recorded position

If the dummy is close and there are no obstacles in front, the dummy will not compute any path and stick with Humanoid:MoveTo() to save resources

  • What I’m asking for

Before you comment aggressively telling me that I should “google it”, I’ve been searching for a reliable source for the past 30-40 minutes and I’ve decided to make a post(this includes Roblox’s and known scripters’ guides)

I want to know if there is any way more to improve script performance on a concept such as this one other than the methods I’ve already listed

(AI_Manager is the script that controls the bots)
Script performance


Thank you in advance :moyai: :moyai: