Infinite road generation

How would i make a script that clones the model continously forward and Backward but it only does it if you go to the direction, you go forward it loads one model (the road) and if you go more forward it loads another model (clones it), and how would i make it unload the other cloned models if you aren’t near it? now i have made a script that generates that model infinitely but its really messy and broken, you can go only one direction and if you go to the other it just breaks and even if you try to go back it wont load it anymore, so i want to do it from scratch so guys could you help me?