Hi. I have a problem with multiple items under an "if" statement. I want all of these to happen. Here's the code:
function GunFX () {
if(Input.GetMouseButtonDown(0) && canShoot == true)
gunShotFX.active = true;
yield WaitForSeconds(1);
gunShotFX.active = false;
audio.PlayOneShot(gunShotSound);
}
↧