Objective Point problem

I need help with this coding. I’ve been trying a lot of ways on how to make this work but I can’t.
How do you make the objective point capturable by team 1 and not team 2?