Would a robot that collects the opposing team’s game elements and carries them in a basket, then closes the basket if the other teams’ robot tries to retrieve them from your robot, be legal?
There are no rules preventing this action, thus it is legal.