Laser should destroy after going out screen

  • Laser should destroy after going out screen, but when i click space key laser instantly get destroyed


  • Try reWriting the Code again. for the laser."specificly the if statement". it did indeed act with Dying instantly.

    _________________________________

    if ( tranform.position.y >= 6) ; {

    Destroy (this.gameobject);

    }

    _______________________________

    if ( tranform.position.y >= 6) {

    Destroy (this.gameobject);

    }