So I'm working on a game where you spawn in a randomly generated level and have to navigate around "trees" and such, and I want a random amount to spawn and in different spots every time. Trying to use a repeat or for function makes the trees spawn infinitely. Here's my file in case anyone wants to look at my code and help me out:
drive.google.com/file/d/1sD_wQFLpdkEwUI8eAEDHl_pqDBp3Hg0g/view
Thanks to anyone who helps.