Bullet Hole sprites don't align correctly on walls

They seem to be aligning almost at random:
alt text

I’m not quite sure why this isn’t working correctly, I’m rather new to Unity and C# as well.

Here is my code for it:

		/*
		 * Shooting
		 */
		float trigger = Input.GetAxis ("Fire1"); // Gets mouse left button input
		if (timeToShoot <= 0.0f && trigger > 0) {
			triggerShot = true;
			timeToShoot = 0.3f;
			RaycastHit hit;
			Ray lineOfSight = new Ray(Camera.main.transform.position, Camera.main.transform.forward);
			Physics.Raycast(lineOfSight, out hit);
			
			var hitRotation = Quaternion.FromToRotation(Camera.main.transform.forward, hit.normal);
			Instantiate(bullethole, hit.point, hitRotation);
			
			print (hit.collider.tag);
		}
		if (triggerShot) {
			timeToShoot -= Time.deltaTime;
			//flare.light.enabled = true;
			if (timeToShoot <= 0) {
				//flare.light.enabled = false;
				triggerShot = false;
			}
		}
		
		/*
		 * END Shooting
		 */

The rotation you are getting is the rotation required to go from your camera’s forward vector to the normal vector of the wall you hit. What you want to use is something like Quaternion.SetLookRotation(hit.normal,Random.rotation);

Assuming your bullet hole is a sprite, then I think you what this (untested):

var hitRotation = Quaternion.FromToRotation(Vector3.back, hit.normal);
Instantiate(bullethole, hit.point, hitRotation);

Here is a possible alternate:

var go = Instantiate(bullethole, hit.point, Quaternion.identity) as GameObject;
go.transform.forward = -hit.normal;