Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I make an NPC who can only be damaged by a specific team?

How would i make an npc/Model with a humanoid that can only take damage from a specific team. I have guns that only damage players on different teams, but it only applys to players.

2 answers

in the weapon, you would need to make it find the player's team and look if he can damage the npc if he is in the right team

You'd need to put something like a StringValue into the npc and make its value the name of a team which can damage an npc and in the script of a gun check if player's team name is the value of that string value.

This discussion is preserved as it was. New answers, comments, and votes are closed.