I am making a game like Mario but with a plane (yeah, I know it is a bit stupid) and I want at begining to spawn some hills at my ground. The problem is I have an script what spawn hills continous and it give me lag. So, I want to know what code script to write to put a limit of hills and when the limit is reached, the spawning stops. Here is the script and a picture of my game:
P.S.: IF YOU HAVE ANOTHER SCRIPT WHAT DO THE SAME THING, BUT IS SIMPLE, PLEASE TO TELL ME.

