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

How would I put humanoids on a team?

For a game that I'm working on I wanted to have different teams be hurt by different elements and enemies making it so that players work together to use each teams differences and abilities to allow for others to progress. To make things more lively I decided that I would add some npcs to run around and fight baddies so that the game I was making didn't seem so still and lifeless. But I ran into a problem when the npcs didn't get killed by the enemies because they weren't on a team. I'm basically just asking how to put humanoids on a team. If someone could help me out I would be very appreciative. thank you.

1 comment

1

You can't put NPCs on an actual team. You have to script your enemies to be able to attack any humanoid. If the team really matters, give npcs an object value of a certain team.

1 answer

✓ Accepted answer

You can't assign teams to NPCs, so you'll have to create a custom system. A BrickColorValue with the team color in the NPC would do the trick, as it could then easily be read by your enemy AI script.

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