How can I stop one object from being deleted in this grid?

Godot Version

Godot 4.7

Question

I’m pretty new to Godot and making a Breakout clone to practice. I have a StaticBody2D with an Area2D with CollisionShape2D (set to collision layer 2) as well as a separate CollisionShape2D for my ball to bounce off of. I tried to instantiate all of the blocks with a for loop at different positions, but for some reason the block’s method to delete itself on collision is being called on the first block ONLY. There shouldn’t be any other collisions in that spot with that collision layer, so how do I troubleshoot this? I think this is an issue with the physics/collisions, but it could be a programming issue.

Ask your question here! Try to give as many details as possible

I managed to figure it out. My objects were being instantiated at (0,0), instantly colliding, and deleting everything there before the rest of my code could run. I think it’s because I was using both my ball and block as autoloads and instantiating them, but feel free to correct me. Once I moved the objects away from that position in their own scenes, it stopped.