Clear Tools

Script for Part

local door = script.Parent


local function remove(otherPart)

local humanoid = otherPart.Parent:FindFirstChild('Humanoid')

local player = game.Players:FindFirstChild(otherPart.Parent.Name)

if humanoid and player then

local inHand = otherPart.Parent:FindFirstChildWhichIsA('Tool')

local inBackpack = player.Backpack:FindFirstChildWhichIsA('Tool')

if inHand then

inHand:Destroy()

end

if inBackpack then

inBackpack:Destroy()

end

end

end


door.Touched:Connect(remove)