In my game, a 32 by 32 by a maximum of 10 blocks deep group of blocks are generated. The problem is, ROBLOX already starts getting laggy when the game reaches over 10000 parts, and with the current computer I have, a 32 by 32 landscape is pretty much the maximum size with a bearable degree of lag. I have already planned to make the terrain much bigger than this, scaling in at about 1000 x 1000 x 500 blocks in dimensions, or if you do the math, an approximate amount of 500 million blocks. Now does anyone know if it will it even be possible to generate so many parts? I have thought of multiple solutions to this, but as I do not want to do the work of testing them out, I am not completely sure if they would be viable or not. Keep in mind that in the code I made for the generation, the terrain starts generating as soon as the game loads, and that there are no countermeasures for the part lag created in the process. If you would like to take a look at the game for yourself, here is the link: https://www.roblox.com/games/521575040/3D-Terraria-Pre-Alpha
Here are my untested solutions so far:
Remove the pre-loaded generation and make a map of the positions of every block in the game. Locally insert the blocks into the game as the player walks close to the relative mapped position of the hypothetical block.
Keep the generation the same way it is and simply make some kind of chunk loading system that would divide and save the terrain into multiple segments. Just in case your one of those people who's answer would be "enable streaming u nob," I have already tried this and it is simply of no help to me, as it actually makes the situation worse.
If you have any other solutions to this part lag, please tell me what this solution would be, and if I am just unaware of something that makes me look like a bad developer, just correct my mistake and be on your way. Anyways, thanks for your time, and sorry for the long read. Any help would be of great appreciation on my side.

4 comments
You should generate terrain as you go, and turn on StreamingEnabled.
No no, just turn on StreamingEnabled, it will do your job for you.
Also, Streaming makes your game like blockheads or minecraft, they don't load all the blocks at one time. They load as you go around the world.
HOOOOLY CRAB TWENTY FIVE THOUSAND VIEWS O_O