TheWave:
Yes, i understand what your saying and i have been testing these things out myself. The newest thing ive figured out is that it works unitl the distnace changes. Do you think there is anything wrong with the code?
If you're using my NewPing library and using my test sketch, it's not the code as it's working on many sensors by many people. So, the problem must be with the hardware, not the software. If using a very long delay like 1000ms still doesn't work consistently, and you've verified all your jumper wires and connections, it's probably a bad sensor.
The good thing is that the sensors are cheap, so trying another one is a viable option.