So I tried searching around and I know this question has been asked before but I couldn't find a solution.
I have grid of objects, and I want to check if they are adjacent ot another object of the same type, and only then are you able to click on them. What I dounf in the forums was that you have to make them a family to be able to compare to instances of the same obecjt, but I can't get it work. I almost have it, but something is still off:
Here's how the grid looks:
And here's the code. It almost works, yet misses the occasional, so I feel like there's just one easy thing I'm missing: