Problem with "if" statements

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);
}

Put the lines into a set of curly braces like so:

function GunFX () {
    if(Input.GetMouseButtonDown(0) && canShoot == true){
        gunShotFX.active = true;
        yield WaitForSeconds(1);
        gunShotFX.active = false;
        audio.PlayOneShot(gunShotSound);
     }
}