How to make the Boolean equal to true for only one object

Hi, I have a grab controller that works perfectly but I got multiple players and I have a boolean switch to true when the player grabs it but I have a bug that when two or more players get to the ball and grab it at the same the boolean of all the players will be true but what I wanted is the boolean switch to true for only one player I have tried to fix it but it didn’t work.

 if (grabSc[0].isGrabed == true && grabSc[1].isGrabed == true)
             {
                 grabSc[0].isGrabed = true;
                 grabSc[1].isGrabed = false;
                 Debug.Log("bothAreGrabed");
             }

How about replacing isGrabed with grabedBy and storing the player or the PlayerID in the grabedBy variable.

In addition, you can always create an isGrabbed getter property:

public bool isGrabed => grabbedBy != null;
public Player grabbedBy { get; private set; }

public bool TryGrab (Player player)
{
   if (isGrabed)
      return false;
   grabbedBy = player;
   return true;
}