Infrared Reflectance Sensor

Reflectance sensors are finicky things. Try to bend the LEDs / phototransistors a bit so they point towards each other (imagine the light bouncing off the surface between the LED / phototransistor). Play around with the distance to your target and what you're using for a "line". Some things that are black to you and me turn out to be much more reflective to these phototransistors.