Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a NPC not attack another NPC?

Asked by 3 years ago

I am trying to make a quick and easy, but fun game for me and some friends to play. All I want to do is make an NPC not attack another NPC but without any scripting. I don't want to put much effort into a game like this, so is there any way I could maybe make the NPCs be on the same team?

0
I dont think there is a way to do this without scripting epoke466 100 — 3y
0
You can change the name of the NPC's humanoids incurszio 70 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

If you wouldn't mind a little scripting you could make a if statement that says not to attack the npc with that name. Here's an example that you can fit into the enemy's attack script:

if humanoid.Parent.Name == "NPC" then
    attack = false 
    --attack would be some kind of variable that says weather to go after something or not
end

This is just an example so if you copy paste this into a script it probably wont work in your specific script.

Ad

Answer this question