#Tetris Destroying system

1 messages · Page 1 of 1 (latest)

opal bramble
#
function CheckCollumsHorizontal(Part)
    local DestroyParts = {}
    local CheckedParts = {}
    for Rows = 1,7 do
        if #CheckedParts == 5 then
            table.move(CheckedParts,1,#CheckedParts,#DestroyParts + 1, DestroyParts)
            CheckedParts = {}
        end
        task.spawn(function()
            for Width = 0,4 do
            if PlaceSet[Rows + 7 * Width] then
                table.insert(CheckedParts,Rows + 7 * Width)
            else
                print(CheckedParts)
                print(PlaceSet)
                break
            end
        end
        end)
        
    end
    return DestroyParts
end``` I tried to check each row but ```if PlaceSet[Rows + 7 * Width] then
                table.insert(CheckedParts,Rows + 7 * Width)
                  ``` doesnt seems to be triggered at all. PlaceSet is a table which contains places that has been set/builded