Bullet is hitting 20% of the time

Hi!

I am trying to create some kind of FPS minigame and I need my bullets to hit something, obviously. But they only hit like 20% of the time. But if I stand right in front of my target they hit 95% of the time. I am using a raycast to register if it hits anything. Here’s my script.

rigidbody.AddRelativeForce(Vector3.up * speed * 100 * Time.deltaTime);

		if(Physics.Raycast(transform.position, transform.up, out hit, 0.2f, enemyLayer) && expended == false){
			expended = true;

			trail.enabled = false;

			Debug.Log ("Hit enemy");

			if(hit.transform.gameObject.tag == "Head"){
				Instantiate(bloodHeavy, hit.point, Quaternion.identity);
			}

			if(hit.transform.gameObject.tag == "Arm" || hit.transform.gameObject.tag == "Leg"){
				Instantiate(bloodLight, hit.point, Quaternion.identity);
			}

			if(hit.transform.gameObject.tag == "Body"){
				Instantiate(bloodMedium, hit.point, Quaternion.identity);
			}
		}

The code is located in Update().

If you know why they don’t hit anything, please tell me!

Thanks

Following @MrSoad’s suggestion, I made so I shoot a ray from the player instead of spawning a bullet that travels. This is the simple code I have in my shoot function.

void Shoot(){
		nextFire = 0;

		if(Physics.Raycast(shootingPosition.transform.position, shootingPosition.transform.forward, out hit, weaponStats.range, weaponStats.enemyLayer)){
			if(hit.transform.gameObject.tag == "Head"){
				Instantiate(particles.heavyBlood, hit.point, Quaternion.identity);
			}

			if(hit.transform.gameObject.tag == "Arm" || hit.transform.gameObject.tag == "Leg"){
				Instantiate(particles.lightBlood, hit.point, Quaternion.identity);
			}

			if(hit.transform.gameObject.tag == "Body"){
				Instantiate(particles.mediumBlood, hit.point, Quaternion.identity);
			}
		}
	}