In Chapter 2 of the SpongeBob SquarePants movie game, throw the key on the robot. Then go to the main hall and make the robot do funny things with the broom. The robot will arrive and let you proceed, but only if the key was thrown first.