This script is supposed to remove anything with the name of "BC" and "KorbloxianKnight"
debounce = false script.Parent.Touched:connect(function(hit) if not debounce then debounce = true for _,v in pairs(workspace:GetChildren())do if v.Name == "BC" and v.Name == "FastRobloxian" then game.Debris:AddItem(v,0) end end end wait(5) debounce = false end)
When you try to determine the current index's name on line 6
then you're using an and statement. The object's name can't be "BC" AND "FastRobloxian" - it can only be one or the other.
So, rather than using an and
statement, use an or
statement.
local debounce = false script.Parent.Touched:connect(function(hit) if not debounce then debounce = true for _,v in pairs(workspace:GetChildren())do if v.Name == "BC" or v.Name == "FastRobloxian" then game.Debris:AddItem(v,0) end end end wait(5) debounce = false end)