script.Parent.ChildAdded:connect(function(g)
wait(0.5)
local newtool = g
local oldtools = game.Lighting:GetChildren()
for i,v in pairs(oldtools)do
local oldname = v.Name
if newtool.Name ~= oldname then
newtool:Destroy()
end
end
end)
so basically i want this script to delete any tool that is added in players backpack if it does not have the same name as 1 of the tools in lighting. but this script only deletes the tool if there is 1 tool in lighting if there are 2 or more tools in lighting this script will not destroy the tool that is added to the backpack. please help

1 comment
Pls use server storage not lighing to store models.