How do I make it so only one player from each team is allowed to be in an area at a time?

so I’m working on a custom game mode and I was wondering, how do I make it so only one player from each team is allowed to be in an area at a time?

A barrier, place a zone infront of it so when a player on one team, the one that is allowed, will walk in the zone and it will deactivate the barrier, so then automaticaly it will not allow players on a different team to enter.


no I mean only one of the players on the one team

so set the spawner to have a certain team, and one player will spawn there, then set that team to the function I gave you.

no, I’m building a mode and there’s an arena and I want it so only one player on each team is allowed in the arena.

Wire a lifecycle device to a relay. Set the lifecycle device to when game starts, then set the relay to a specific team.

Put a barrier around the area. Next, set the active scope to team.

Connect the barrier to the relay, so that when the relay is triggered, deactivate barrier.

Each player will need their own team.

it didn’t work when i was in creative, but i’ll go test it now.

No, it didn’t work at all.

Ok, can you send screen shots of the code?

how so you send images?

By clicking the little icon next to the emoji icon when you hit reply.

ill send it soon!!!

@WolfTechnology here’s all the screen shots

Ok, are you trying this with more than one player? If not that is why it does not seem to work.

ok well will you add ur self my game to see if it works?

well, if not it’s okay…

Sadly the rules of this forum do not allow codes, so j0in your game with an alt.

Make a laser on the barrier. The laser should increment a counter with a target of 1. The counter should activate the barrier. The counter should also be team scoped.

ok, i will try that!

Also make the laser increment a counter with a target of 2. When the counter reaches the target, it should reset the first counter, itself, and deactivate the barrier.