So I’ve been making a minecraft recreation. My major issue is the lag. When the game generates the world, it starts heavily lagging. I’ve tried putting wait() in the generation loop, but it’s still the same. I appreciate any help from you guys, thank you.
Edit 1 : I also need help with making a system that makes blocks disappear when you’re at a certain distance away.
I can’t fully answer your question or give many in-depth examples, but I can give a few pointers.
To speed up world generation, try multithreading with Parallel Luau; this is one of the few cases where setting up a multithreaded system is actually worth it.
Here’s an excellent video tutorial: https://www.youtube.com/watch?v=BbIPalpAfaI