How I can optimize terrain generation?

Also worth noting that as long there’s no lag you can batch multiple loop iterations together and only wait on every Nth iteration(for example every 2 iterations):

if x%2 == 0 then task.wait() end --only wait every time x is even
1 Like