hey everyone!
I’m getting a problem with my code… I’ve told it to instantiate a “bomb blast” when space is hit but it doesn’t… It only does it when the game starts up and never again… Also the bomb itself isn’t destroyed so yeah… Here’s the code everyone and thanks for the help!
public class Boom3 : MonoBehaviour {
public GameObject boom;
public Transform boomb;
void Update () {
if (MotherBomb.bombnum == 3) {
if (Input.GetKeyDown ("space")) {
Instantiate (boom, boomb.position, boomb.rotation);
Destroy (gameObject);
}
}
}
}