private void Shoot() { FireButtle.Play(); AudioSource shootSound = GetComponents <AudioSource> ()[0]; // [0] = shoot sound; [1] = reload sound shootSound.mute = false; shootSound.Play(); RaycastHit hit; if (Physics.Raycast(FpsCamera.transform.position, FpsCamera.transform.forward, out hit, Range)) { Destroy(Instantiate(ImpactEffect, hit.point, Quaternion.LookRotation(hit.normal)), 0.25f); Target target = hit.transform.GetComponent <Target> (); if (target != null) { target.TakeDamage(Damage); } if (hit.rigidbody != null) { hit.rigidbody.AddForce(-hit.normal * ImpactForce); } } myMagazine.Decrement(); }