I’m trying to make all other items be destroyed when equipping a new one.
Basically when I equip a new item I want everything else to be destroyed besides the item I’m going to be equipping as there’s a one item limit in my game.
When equipping a new item it overlaps with the old item other than destroying the old item, using a auto equip script.
local Attacher = Instance.new("Attachment")
local Proxi = script.Parent.ProximityPrompt
Attacher.Parent = script.Parent
Proxi.Parent = script.Parent
wait()
script.Parent.ProximityPrompt.Triggered:Connect(function(Humanoid)
Humanoid.Backpack:ClearAllChildren()
local Copied = tool:Clone()
Copied.Parent = Humanoid.Backpack
Proxi.Enabled = false
wait(300)
Proxi.Enabled = true
end)```