Flood Fill for Randomly Generated Gridl.

Hello, I am currently working on a what is supposed to be quick project. The section I am having troble with is a 10x10 grid of cubes that when triggered change their state from walkable to gap. Afterwards they are changed in Z to present a Procedural Grid for player movement. One of the things I was trying to get ahead of is that the player can only move in X or Y not a combonation. So I attempted to create a flood fill algorithim to check and see if there were any islands or tiles connected only diagnolly. I thought is was working but now I am noticing it isn’t catching it. Not sure what is going on as this is the first time ive built logic like this. I will attach a picture of my current set up. Any Advice or help would be greatly appreciated.