Hello I am making a 3d endless runner and I am just wondering how can I get new floor tiles to spawn upon reaching a certeain distance?

each tick check if distance is greater than target distance, if it is spawn tile set and increase target distance.