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.
for i = 1,5 do local newBlock = Instance.new("Part") newBlock.FormFactor = "Symmetric" newBlock.Size = Vector3.new(5, 5, 5) newBlock.Position = Vector3.new(i * 5, 0, 0) newBlock.Anchored = true newBlock.Parent = workspace for _ = 2,5 do local newBlock = Instance.new("Part") newBlock.FormFactor = "Symmetric" newBlock.Size = Vector3.new(5, 5, 5) newBlock.Position = Vector3.new(i * 5, 0, (_ * 5) - 5) newBlock.Anchored = true newBlock.Parent = workspace end end
This script managed to generate a 5x5 grid of blocks.