I want a lot of hostile NPCs, for a wave game, where they have shoting weapons, and I dont know how aproach the problem. I was thinking in making a Module Script, maybe call it “NPCS SPAWNER”, with some global methods just for spawning NPCs. I was thinking to have only one script for the AI, maybe call it “AI CONTROLLER”, using collection service for starting the AI as soon a humanoid is tagged, (the NPC SPAWNER module script will take a position, some arguments and a character with a humanoid and add it a tag) and then use Bindable Events, created from the same script, for constantly updating loops functions of the npcs, like walking or searching for players, but maybe is better to make each NPC handle itself? Could not be bad updating all NPCs at once in terms of performance? How does other games do? Its there a better aproach?
Any help and experiences are appreciated
And what about coruntines? I should care?
I was thinking too, just making the NPCs a HumanoidRootPart, in the server, and render the rest in the client, and disable some humanoids states for performance