Setting and getting variables

I’m trying to make a Minecraft esque crafting system. I have gameobjects named “diamond” that should disappear with the code below. However, it does not. Any help?
Code for each slot:

Main crafting code