Is there a better way to do this?
When you detect an obstacle the laser (loop) continue with the path of the laser.
I suggest you'll replace this line:
Line: Set width to Line.Width-1
With this short command:
System: Stop loop
The new line will end the "searching" cause the laser hit something.