I'm wondering how I would remove a certain tool when player touches the Brick, so far I have this Script:
function onTouch(hit)
character = hit.Parent
if game:GetService("Players"):GetPlayerFromCharacter(character) then
player = game:GetService("Players"):GetPlayerFromCharacter(character)
tools = player.Backpack
for _,a in pairs(tools) do
if a:IsA("Tool") or a:IsA("HopperBin") then
a:remove()
end
end
end
end
This is what I've tried and it works, I'd just like to know how to remove a certain tool out of the Backpack, for example if I wanted to remove or destroy a tool called 'Pizza' without removing it from other players Backpack, just the player that touched the brick.
