i have queastion
and how can I find neighbors for parts previously found (colored)
If you donāt care about the name of the parts, name each their equivalent i in this for loop, then, to find the parts close to it, do something like this:
local Columns = 4 -- should be the number of columns of all the parts
local PartTop = model:FindFirstChild(tostring(tonumber(part.Name)-Columns))
local PartBottom = model:FindFirstChild(tostring(tonumber(part.Name)+Columns))
local PartLeft = model:FindFirstChild(tostring(tonumber(part.Name)-1))
local PartRight = model:FindFirstChild(tostring(tonumber(part.Name)+1))
Like I said previously, this will only work if you do not care about the name of the parts at all and know the exact amount of columns of these parts, if thatās true, then this system will be the best and most efficient way to do it, as itās just basic math and four :FindFirstChild instead of raycasting 4 times (although I donāt think raycasting for very short distances would be very inefficient).