I'm re-creating motherload, and now i want to add generated puzzels in my field, but the only way i think of that it could work is to re-calculate the distance between the puzzel's center and a new vector3 value, but i think this would be easier with using a 5x5 grid (becouse my blocks are 5x5x5 wide). but i dont know how to get that to work. anyone have an idea?
I would generate it dimension by dimension.
01 | for i = 1 , 5 do |
02 | local newBlock = Instance.new( "Part" ) |
03 | newBlock.FormFactor = "Symmetric" |
04 | newBlock.Size = Vector 3. new( 5 , 5 , 5 ) |
05 | newBlock.Position = Vector 3. new(i * 5 , 0 , 0 ) |
06 | newBlock.Anchored = true |
07 | newBlock.Parent = workspace |
08 | for _ = 2 , 5 do |
09 | local newBlock = Instance.new( "Part" ) |
10 | newBlock.FormFactor = "Symmetric" |
11 | newBlock.Size = Vector 3. new( 5 , 5 , 5 ) |
12 | newBlock.Position = Vector 3. new(i * 5 , 0 , (_ * 5 ) - 5 ) |
13 | newBlock.Anchored = true |
14 | newBlock.Parent = workspace |
15 | end |
16 | end |
This script managed to generate a 5x5 grid of blocks.