Is there any plugin or method to finding accidental duplicates of parts? I find it tedious to try identify when I’ve duplicated a brick by accident and I was wondering how others handle that, if it’s even a problem for them.
Here’s a quick little function you can use in the command bar that iterates through the parts in workspace, and selects its touching parts that have the same Position, Orientation, and Size.
function selectDoubles()
local checked = {}
local doubles = {}
for _, part in next, workspace:GetDescendants() do
if part:IsA('BasePart') and part ~= workspace.Terrain then
if checked[part] == nil then
local transmitter = part.Touched:Connect(function() end)
for _, touch in next, part:GetTouchingParts() do
if touch.Position == part.Position and touch.Orientation == part.Orientation and touch.Size == part.Size then
checked[touch] = not nil
table.insert(doubles, touch)
end
end
transmitter:Disconnect()
end
end
end
print('Selected', #doubles, ' duplicate parts')
game.Selection:Set(doubles)
end
Wish I had seen this six months ago. Brick Battle games go crazy if there are overlapping parts. So much work to make sure there are no duplicates or overlapps.
I came up for a very basic solution that works if you haven’t used any transparent parts in your project yet.
Just select the whole thing and set transparency to 0.5. That’ll allow you to see all the overlapping and if anything isn’t transparent, then there’s duplicate parts.