Select
Drag a inside the While block.
This will tell the robot to perform a task if it cannot detect something.
Select
Drag a inside the Not block.
Change FrontEye to DownEye.
The robot will now follow the upcoming blocks While it does not see red.