user-1: I'm building a laser tripwire of sorts and instead of shutting up when the laser points on it (which is essential for my project) it beeps louder.
Here's the code 
int buzzPin = 11; // buzzer connected to digital pin 11

void setup() {
    pinMode(buzzPin, OUTPUT); // sets the digital pin as output
}

void loop(){
    if(analogRead(0) < 750){ // this number depends on calibration of the photocell
        digitalWrite(buzzPin, HIGH); // turns buzzer on
        delay(5000); // waits for 1 second
        digitalWrite(buzzPin, LOW); // turns buzzer off
    } else{
        digitalWrite(buzzPin, LOW);
    }
}


user18478: Arduino can not measure resistance. It can measure voltage.
To measure resistance you can convert resistance to voltage using a voltage divider.  
In Arduino world a voltage divider consists out of 2 resistors in series between 5V and gnd. The connection to the 2 resistors is connected to a analogue pin. 
Depending whether your LDR is connected to gnd or 5V the measured value on the analogue pin will go up or down with the resistance of the LDR.  
In other words swap the resistor and your LDR from position.

-1: <p>I'm building a laser tripwire of sorts and instead of shutting up when the laser points on it (which is essential for my project) it beeps louder.</p>

<p>Here's the code </p>

<pre><code>int buzzPin = 11; // buzzer connected to digital pin 11

void setup() {
    pinMode(buzzPin, OUTPUT); // sets the digital pin as output
}

void loop(){
    if(analogRead(0) &lt; 750){ // this number depends on calibration of the photocell
        digitalWrite(buzzPin, HIGH); // turns buzzer on
        delay(5000); // waits for 1 second
        digitalWrite(buzzPin, LOW); // turns buzzer off
    } else{
        digitalWrite(buzzPin, LOW);
    }
}
</code></pre>
 18478: <p>Arduino can not measure resistance. It can measure voltage.<br>
To measure resistance you can convert resistance to voltage using a voltage divider.  </p>

<p>In Arduino world a voltage divider consists out of 2 resistors in series between 5V and gnd. The connection to the 2 resistors is connected to a analogue pin. 
Depending whether your LDR is connected to gnd or 5V the measured value on the analogue pin will go up or down with the resistance of the LDR.  </p>

<p>In other words swap the resistor and your LDR from position.</p>
