I am wanting to create a checkboard pattern that appears on screen procedurally, so like
frame 1 would appear first, then 2, then 3, etc. until the whole screen was covered
I’m trying to just figure out the right math for it, and so at just 2 for the amount, which creates 3 frames, so frames 1, 2, 3 should be there
local Amount = 2
local Sizing = HUD.AbsoluteSize.X / 12
for g = 1, Amount do
for i = 1, g do
local NewFrame = Instance.new("Frame")
NewFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
NewFrame.BorderSizePixel = 0
NewFrame.Size = UDim2.fromOffset(Sizing, Sizing)
NewFrame.Position = UDim2.fromOffset((i - 1) * Sizing, (i - 1) * Sizing)
NewFrame.Parent = HUD.Frame
task.wait(0.1)
end
end
It creates 2 frames at 0, 0, and then the 3rd at 159, 159.