The title says it all.
local tool = script.Parent -- Make sure the parent is a HopperBin inside of StarterGear tool.Selected:connect(function(mouse) -- When the tool is selected... mouse.Button1Down:connect(function()-- When the mouse is clicked... if mouse.Target ~= nil and mouse.Target.Name == "Part" then -- [[Change the Part to whatever the name of the object is, this makes sure that the part that the mouse is clicking isn't a random part that is crucial.]] mouse.Target:remove()-- Remove the object end) end)
Hope i helped!