So I'm making an RPG game that involves mining. Once a player mines an iron vein he/she receives a tool. That tool is called "IronOre". It's a tool that is composed of simply a handle and that's it. I want to make a furnace that has a brick. Now I want that brick to have a "clickdetector" so a player can click on the block and a gui will pop up and the player can select an option that will "smelt" the "IronOre" into an "IronBar". I have no idea on how to do this xD Please help? I will be very grateful for your kindness.!
I already have the block with click detector and the gui and stuff.
What I tried putting inside of my button that is inside of my gui. (i know it was a complete fail :( but what do i do? oh and by the way, the "IronOre" and "IronBar" are in Lighting):
function Onclicked ()
if player.Backpack.("IronOre")
then player.Backpack.destroy ("IronOre")
and give.player.Backpack ("IronBar")
end
end

2 comments
Can you post code you have tried?
You might need to use conditional statements, aswell as some ternary operators.