The script looks to be fine. If you shoot do the bullet holes appear where the raycast is pointing or are they being shot directly onto the wall in front of you? The debug.drawray can be positioned differently than the actual raycast so it's worth testing out to see if it's just the drawray having issues or the actual raycast.
You can create another game object in place of the camera and apply the script there to see if the raycast is having issue with the camera or if it’s just a script issue.
Also, it's hard to tell, but make sure this is applied to the camera and that it's not rotated. It doesn't look like it's rotated, but I also don't know if the script is applied to the camera. If all else fails just re-create the camera and apply the script again.