I want to make a system where the script loops through the character and if it finds one item with one of the table’s value if the scripts find it I want it to destroy the item.
local ItemTypes = {
"DustySteelItem",
"DustySilverItem"
}
for _, v in ipairs(ItemTypes) do
if character:FindFirstChild(v) then
character:FindFirstChild(v):Destroy()
end
So as you can see it loops through the character trying to find one of the table’s values if it does it’s going to destroy it. But I did tell the script to print some text in the loop and it did pass the if statement which means that it did find an item with that name but it did not destroy it.