Answered by
3 years ago Edited 3 years ago
Remember that Vector3 only takes 3 arguments, no more, of X, Y, Z. One of the intervals you added was empty, which were the ones outside the enclosed brackets.
Here are the fixed script(s):
05 | local Maxheight = math.random( 10 ) |
06 | local Minheight = math.random(- 10 ) |
13 | local GenerationInProgress = false |
14 | local TerrianGenerationFinished = false |
15 | local IsChunkLoading = false |
17 | local TerrianFolder = workspace.TerrianF |
18 | local Chunks = TerrianFolder.Chunks |
21 | function StartGeneration() |
22 | if GenerationInProgress = = false and TerrianGenerationFinished = = false then |
23 | GenerationInProgress = true |
25 | warn( "Started Loading Chunk" ) |
27 | warn( "Error Code 0/01" ) |
32 | if IsChunkLoading = = false then |
35 | warn( "Error Code 0/02" ) |
40 | for i,v in pairs (Chunks:GetChildren()) do |
41 | if v.IsLoaded.Value = = false then |
51 | for i,n in pairs (v.Nodes:GetChildren()) do |
52 | n.Position = Vector 3. new(math.random(Maxheight,Minheight)) |
53 | warn( "Set Nodes i guess?" ) |
OR you could do this:
10 | local GenerationInProgress = false |
11 | local TerrianGenerationFinished = false |
12 | local IsChunkLoading = false |
14 | local TerrianFolder = workspace.TerrianF |
15 | local Chunks = TerrianFolder.Chunks |
18 | function StartGeneration() |
19 | if GenerationInProgress = = false and TerrianGenerationFinished = = false then |
20 | GenerationInProgress = true |
22 | warn( "Started Loading Chunk" ) |
24 | warn( "Error Code 0/01" ) |
29 | if IsChunkLoading = = false then |
32 | warn( "Error Code 0/02" ) |
37 | for i,v in pairs (Chunks:GetChildren()) do |
38 | if v.IsLoaded.Value = = false then |
48 | for i,n in pairs (v.Nodes:GetChildren()) do |
49 | n.Position = Vector 3. new(math.random( 10 ,- 10 )) |
50 | warn( "Set Nodes i guess?" ) |
Edit: Fixed grammatical errors!