yield waitforseconds false/true

function Update () {

if(Input.GetButtonDown("Jump") && !Player1Shoot.MINE && !Player1Shoot.MACHINEGUN && !Player1Shoot.ROCKET && Player1Shoot.SHIELD){

    GetComponent(MeshRenderer).enabled = true;
    collider.isTrigger = true;
    yield WaitForSeconds(15);
    GetComponent(MeshRenderer).enabled = false;
    collider.isTrigger = false;

    }
}

why doesn't it work????

yield doesn't work in coroutines such as Update or OnGUI.

yield statements can only be used in coroutines and if the Renderer is attached to the GameObject you do not have to use GetComponent. Your script could look something like this:

function Update () {
  if(...){
    SwitchTrigger();
  }
}

function SwitchTrigger() {
  renderer.enabled = true;
  collider.isTrigger = true;
  yield WaitForSeconds(15);
  renderer.enabled = false;
  collider.isTrigger = false;
}