Script generating terrain slowly

Note: don’t use this for help, my code was really terrible and slow and that was why it wasn’t working.

So basically all I want to do is make this script run faster. As you can see in the attached video, it runs very slowly. Is there any way I could make it load the chunks at the same time without freezing the game?

By the way this is my first post, so if I did anything wrong please tell me!

edit: i removed the code because i no longer need help, but if you have any suggestions please leave them!

im afraid this is impossible hence loading screens
(instant anyway)

I belive there is no way but you could try to add terrian under the player that you made then the script you have made will create the rest of the terrian

Is there a way I could split the generation into multiple threads? Like load more than one chunk at the same time because right now it waits for the chunk before to finish loading before moving to the next one and I don’t know how to stop it doing that.

I’ll probably make it so that the character is in some sort of load area and is then teleported onto the main area once the ground under them is generated

not sure but i think your looking for spawn()
(i was actually researching spawn() when i noticed i got a notif lol)

1 Like