Table.insert into a table from the start instead of the end?

Hi, I currently have a stat tracker system.

Everytime a player completes a game, it tracks their stats and adds it to a table.

I show the player’s their 10 most recent stats, so I basically iterate from the 1st to the 10th index of the table and do whatever’s needed with each one.

It works fine until the player’s completed more than 10 games, since table.insert is inserting from the end of the table, my check doesn’t get past 10.

I’m looking for a way to insert from the 1st index and essentially shift back all other entries by 1, preferrably without the need to iterate through each one and perform an operation on it.

Welp, I’ve gotten it working. I had referenced the wrong table.

You can use the full 3 parameters of table.insert, where the value to insert becomes the third one & the index to insert at becomes the second parameter.