I have the loop finding the names of frames in "Slots". I want the loop to end once it found just one slot that fits the category. If there are other slots as duplicates I want them to be left alone. How do I do this?
for i,v in pairs(Slots)do if v:IsA("Frame")then if v.Name == BeltName then v:Destroy() for _,R in pairs(Slots)do if R.Name ~= v.Name then if R.Position == v.Position then R.SlotUsed.Value = "false" v:Destroy() break end end end end end end