See https://youtu.be/c8pimYmVy-k to learn what's happening here, and watch the entire playlist here: https://www.youtube.com/watch?v=hBhdEAvnbiQ&list=PLlU_NITRro7dX35GqnH7I91Wuj_LLX5t0 Click the green flag to see how many goblins detect getting hit by stars and how many stars detect hitting a goblin. In many tower defense games, bullets from towers hit enemies. The bullet and the enemy that touch each other should both disappear from the game at the same time. This code uses a game loop to ensure that certain pieces of code (like "is touching") definitely run before certain other pieces of code (like "delete this clone") Switched from the lightning sprite to the star sprite because of this: https://scratch.mit.edu/discuss/topic/433620/
Subscribe to the Game Titan YouTube channel at https://www.youtube.com/c/RealGameTitan?sub_confirmation=1 for more videos explaining more about what is going on here and an approach for removing race conditions from your scratch programs.