Before anything else, I noticed that the first loop is incorrect and wouldn’t do anything:
for i=72, 7, 1 do
It’s attempting to count up from 72 to 7, rather than counting down. The last arg needs to be -1 :
for i=72, 7, -1 do
or flip the 72 and 7
for i=7, 72, 1 do
I’m not sure exactly what you are actually trying to do. You said “I need remove last 6 of 72” but the loop seems to be shifting everything down by 6, thereby removing the first 6 entries.
If you need to remove entries at the start and have all of the other entries adjust automatically to close any “gaps” in the table, just use table.remove() in a loop (and always loop backwards when doing this otherwise the previous removal will cause the indices to mismatch on the next removal):
for i= 6, 1, -1 do table.remove(blockList[i]) end
If you really did mean you want to remove the entries at the end and the initial loop in your sample was wrong, just change the loop indices:
for i= #blockList, #blockList-6, -1 do table.remove(blockList[i]) end
(Note: #blockList means “the length of the blockList table”. Using #blockList instead of “72” means that if you ever decide to change the length of this table from 72, you won’t need to go back and change the number 72 in lots of places in your code. It’s worth getting into the habit of using the # for getting the length of the table.)
Then if you want to add new entries, you can force them into any index in the table using table.insert:
for i= 1, 6 do table.insert(blockList, i, extraLine[i]) end
This will insert extraLine[1] into position blockList[1] , and move any existing entries up so the previous blockList[1] gets bumped up to blockList[2]. Then extraLine[2] into position blockList[2], and so on.