Mining game issue

Ok so I have a bit to cover but what I’m trying to accomplish is something similar to how mining works in Dungeon Keeper if you have ever played that.
Essentially you select a tile and entities in the game approach what is selected and dig it out. This is a 3d grid based digging system I believe so some of those features in the game don’t apply to “mine” (see what I did there?) because I’m using 2d tiles.

What I’m trying to accomplish is this. I can delete 32x32 tiles but I need a way to have the next row of tiles above the tiles I deleted change to a wall tile instead of remaining a top surface tile. If that makes sense. The tiles are all snapped to a 32x32 grid in the game.

What I tried was this event which didn’t work but in my head I thought it would.

If Bounding top position of Surfacetile = bounding bottom position of surfacetile.

Then create wall tile at position Surfacetile.x() and Surfacetile.Y() (layer:Base layer)

Let me know if you have any ideas on this. I know its an odd thing but I feel there may be a drop down feature or extension I might be missing. This is my first project with Gdevelop so I’m excited to learn and appreciate the help.
Thanks.