private void Hit() { if (Physics.Raycast(theCam.transform.position, theCam.transform.forward + new Vector3(Random.Range(-theCrossHair.GetAccuarcy() - currentGun.accuarcy, theCrossHair.GetAccuarcy() + currentGun.accuarcy), Random.Range(-theCrossHair.GetAccuarcy() - currentGun.accuarcy, theCrossHair.GetAccuarcy() + currentGun.accuarcy), 0), out hitInfo, currentGun.range)) { GameObject clone = Instantiate(hit_effect_prefab, hitInfo.point, Quaternion.LookRotation(hitInfo.normal)); Destroy(clone, 1.5f); } }