Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Trying to make a chunk loader, but its crazy?

Asked by
enes223 327 Moderation Voter
5 years ago
Edited 5 years ago

I'm trying to make a game like minecraft but my chunk loader is just a bit crazy.

Video

Source Code:

01--By enes223
02local prefabStorage = game:GetService("ReplicatedStorage")
03local Prefabs = {
04    ["Grass"] = prefabStorage:WaitForChild("Grass")
05}
06local chunkX = 16
07local chunkY = 64
08local chunkZ = 16
09local chunkSize = Vector3.new(chunkX,chunkY,chunkZ)
10local chunkPosX = 0
11local chunkPosY = 0
12local chunkPosZ = 0
13local chunkPos = Vector3.new(chunkPosX,chunkPosY,chunkPosZ)
14local chunkNumber = 0
15local Seed = math.random(0,10000000)/100
View all 51 lines...
0
When you use the built in hyperlink format, you put the text you want to appear in the brackets [], then the url to link to in the parenthesis (). Your youtube link opens to _blank. InfinityDesign 280 — 5y
0
https://www.youtube.com/watch?v=UkaK9Qx17zY - World Generation by SpooksHD killerbrenden 1537 — 5y
0
look at my video, also that world generation is really random enes223 327 — 5y
0
I'm just giving ideas. killerbrenden 1537 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

Roblox actually already has this built for you, and it's called Streaming. you can enable it by setting workspace.StreamingEnabled to true and can control the minimum and maximum streaming radius with workspace.StreamingMinRadius and workspace.StreamingTargetRadius

learn more here

Ad
Log in to vote
0
Answered by
enes223 327 Moderation Voter
5 years ago

Nevermind, I found a way to fix, I changed to method, thanks for trying to help.

Video

Final Code:

01--By enes223
02 
03local prefabStorage = game:GetService("ReplicatedStorage")
04 
05local Prefabs = {
06    ["Grass"] = prefabStorage:WaitForChild("Grass")
07}
08 
09local chunkX = 8
10local chunkY = 16
11local chunkZ = 8
12local chunkSize = Vector3.new(chunkX,chunkY,chunkZ)
13 
14local chunkPosX = 0
15local chunkPosY = 0
View all 66 lines...

Answer this question