I need to code a program where there will be "3 blocks" and a "Player" in a queue and as the player moves, the 3 blocks in the queue replaces as the player gets further away from the first block. like this: 1,2,3,1,2,3
so as the player is further away from 1, it will replace the coordinates to be nearer to the player.
How can i do that?