So far what I have done is taken a script from a shop button and the script from a keycard door to try and make a brick that, when touched with a tool removes the tool that touched it and then gives you something else. It doesn't work though, this is what I have:
script.Parent.Touched:connect(function(p) if p.Parent.Name == "Scrap" then local ItemName = game.Lighting.Box ItemName:Clone().Parent = p.Backpack end end)
I don't know how to make the removing tool either. Any help is appreciated.
Thank you soban06. I figured out how to do it.
script.Parent.Touched:connect(function(p) if p.Parent.Name == "Scrap" then local ItemName = game.Lighting.Box ItemName:Clone().Parent = p.Parent.Parent p.Parent:Destroy() end end)