Hi i need help with scripting a npc
so i want that the npc is attacking people like a enemy npc
----------------------------------what i need as help---------------------------------------
-attacking script and where to add it’
-other things and where to add it
This isn’t much information to go on - how do you expect the NPC to attack; melee or ranged? How do you want it to acquire targets? Do you want it to be mobile, and how much if so?
As for your question of where to place your NPC’s scripts, it depends on whether you only have one NPC or if you want more. If it’s the latter, you’ll want to give your NPCs a tag using CollectionService and have a single script in ServerScriptService that controls anything with the NPC tag.
thx for the links but idk how to find it , the names like pathfinding → how can i know that this says about the npc, because of this i am making post about it
but this links doesnt have the script of the attacking npc what i wanted is the scripts and the other things i need to make a attacking npc but this shows the zone and the pathfinding…
not the attacking script or the other things
You should at least try and make the script and if you have a problem go to the DevForum. Pathfinding is very simple, you can literally copy the one on the DevHub and then edit it to your likings. If you want to make it when the NPC touches a player the player loses health, that’s easy also.
Here is a youtube tutorial:https://www.youtube.com/watch?v=7YObneM-x_Y.
It’s not really a tutorial, just shows you how to put it together with pre-made scripts, but I guess that’ll do it for you since you don’t script, as you said.