How do I give an item to one team only

I want to give team 2 a weapon without giving team 1 a weapon. Does anyone know how this could work?

Use a relay and set it to everyone in team two. Then, make a life cycle device, connect it to the relay, then connect the relay to the item granter.

If a team spawns in a certain area that only they have access to then you can make the item granter give an item to players who spawn in a certain area. A way I did this was the spawning area for the team that gets the item is blocked off by a laser that doesn’t harm them, but harms the other team. If you need a screenshot I can show you how to set it up later.