The title says it all. Of course, just greeting you and simply saying “The title says it all” would be lackluster. So I’ll give you an in-depth question, I guess.
Anyway, I’m working on a PVE, tower defense game and starting to work on enemy AI. I’m wondering if I should use Module Scripts to script enemy AI, specifically two functions. One being to tell the enemy to either target whatever thing the players are protecting or target players if they’re near and the second one being to tell the enemy to attack. (I’m planning on having the function just fire an event to make the enemy attack).
Okay, I may get away for using a ServerScript to give targeting logic to enemies, but how about attacking? All enemies are going to attack in different ways like punching, firing, etc.
I literally mean just make a folder in your workspace, and put all you npc models inside it. And yes, you can use it to control ALL logic. You can make a folder called MeleeNPC, put all NPCs with the same logic, and use 1 server script to control pathfinding, attacking, ect