Problem with Proximity Sensor, Light stay on/off when triggered

I'm trying to make an LED stay on when triggered with a proximity sensor and then turn off and stay off when triggered again. I got the sensor to work just fine when I wanted it to turn the light on when being touched and then turn the light off when it is not being touched.

But since i made a change to the code it only partially works. When I touch it the sensor it will react (slower than i want it to) and turn the light on and leave it on. But when I touch it again the LED will dim slightly and once i'm done touching it the LED will either stay on or turn off and stay off. So it's very inconsistent with a slow reaction time. Any input would help

here's the code. Thanks!

int sensorVal;

#define bulb 12

void setup(){
//configure pin2 as an input and enable the internal pull-up resistor

Serial.begin (9600); //Start the serial monitor

pinMode(2, INPUT_PULLUP);

pinMode(12, OUTPUT);

}

void loop(){

sensorVal = digitalRead(2);
// The Logic is inverted a low on pin 2 means a sinking switch is activated
// and a high on pin 2 means the switch is unactivated and pulled up by the internal resistor
// this is not a problem since the controller can interpret the data any way we tell it to

if (sensorVal == LOW){

Light(); //execute the Light subroutine below

}
}
void Light() //Start the Light subroutine

{ int reading; //turn on the light

reading = digitalRead(12);
if (reading == HIGH){digitalWrite (12,LOW);}
else{digitalWrite (12, HIGH);}
}