Combining Parts

So i have a script that makes a grid of parts, i want to combine parts of the same color to reduce part count
How it looks currently (Top) vs How i want it to look (Bottom) Exmaple


i have tried writing code for this, i don’t have it because i deleted it
but it was awful

it relied on parts being grouped into lines, and numberedly named (is that a word??)

the code looked a bit like

index = 1
length = 1
indextoresize = 1

for L=1,#Model:Getchildren() do
      for A=1,#Model[L]:Getchildren() do


end
1 Like

Have you tried Unioning them? This could help…

1 Like

i thought that unions increase lag

1 Like

You can turn this into a mesh and make the certain textures for the dimensions. This would require some math and work.

1 Like