Hey can you help me understand what a nested loop is?
local CUBE_SIZE = 2
function makecube()
local cube = Instance.new("Part")
cube.Size = Vector3.new(CUBE_SIZE, CUBE_SIZE, CUBE_SIZE)
cube.Color = Color3.fromRGB(255, 255, 0)
cube.CFrame = CFrame.new(14.8, 0.5, 29.4)
cube.Parent = game.Workspace
end
for heightIndex = 1, TOWER_SIZE do
local spawnY = (heightIndex - 1) * CUBE_SIZE
for heightIndex = 1, TOWER_SIZE do
local spawnY = (heightIndex - 1) * CUBE_SIZE
for lengthIndex = 1, TOWER_SIZE do
local spawnX = lengthIndex * CUBE_SIZE
for widthIndex = 1, TOWER_SIZE do
local spawnZ = widthIndex * CUBE_SIZE
makecube(spawnX, spawnY, spawnZ)
task.wait(0.25)
end
end
end
end```
** You are now Level 3! **