The spawner of the bomb doesnt instatnitate more than once when we attach a RigidBody2D to it. The rigidbody is to decrease health. The decreasing health works, but it only spawn once.
As for the bomb disappearing, is your bomb prefab set to an actual prefab? Or a gameobject in the scene? To check if the spawn event is actually firing, add a print(“Spawned bomb.”); next to the instantiate call and make sure it’s looping. If it is then you know the problem is in the prefab.
Hi Thanks for taking the time to help us. Our bomb is a prefab. I tried putting a loop but its still instantiating it only once. The Spawned bomb only printed once.
Hmm… what object is the Bomb script attached to? Either the gameobject it’s on is being deactivated/destroyed, or the coroutine is being stopped with StopCoroutine().