if(sensorValue>450){ // i just want the movements to stop as soon as i press on the force sensor and move to 45, but instead it finishes going from 0-180 and then goes to 45
It does that because you told it stick its head in the sand and ignore the force sensor for a while.
openClaw();
delay(2000);
closeClaw();
delay(2000);
Move to 0. Wait a second. Move to 180. Wait 2 seconds. Wait 2 more seconds. Then,
if(sensorValue>450){ // i just want the movements to stop as soon as i press on the force sensor and move to 45, but instead it finishes going from 0-180 and then goes to 45
servoClaw.write(45);
}
See if is necessary to go to 45, and go there if it is.
You need to dump the openClaw() and closeClaw() functions, now that you know the claw works.
You need a function that closes the claw in small increments, testing the sensor at the end of each movement, just like a human does.