I need to have a trash can, that when you click it, it removes your tools from your inventory. This is what I have so far. Can anyone assist?
function onClicked() local human = onClicked.Parent:findFirstChild("Humanoid") if (human ~= nil) then onClicked().Parent.Name h = game.Players:findFirstChild(g).Backpack:getChildren() for i=1, #h do h[i]:remove() end end end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

2 comments
Please use code blocks for scripts.It is in edit mode at the top left corner with a lua logo.
Nice free model