local xRow = GridBase.Size.X / GridPart.Size.X
local zRow = GridBase.Size.Z / GridPart.Size.Z
local gridCorner = GridBase.Position/2 -- This is what I currently have but idk how to manipulate this
for x = GridPart.Size.X,GridBase.Size.X,GridPart.Size.X do
for z = GridPart.Size.Z,GridBase.Size.Z,GridPart.Size.Z do
local newPart = GridPart:Clone()
newPart.Parent = GridBase
newPart.Position = gridCorner + Vector3.new(x,1.25,z) -- Movement
end
end
for x = -GridBase.Size.X/2,GridBase.Size.X/2,GridPart.Size.X/2 do
for z = -GridBase.Size.Z/2,GridBase.Size.Z/2,GridPart.Size.Z/2 do
local newPart = GridPart:Clone()
newPart.Parent = GridBase
newPart.CFrame = GridBase.CFrame * CFrame.new(x,0,z)
end
end
local gridCorner = GridBase.Position - (GridBase.Size/2)
for x = 0,GridBase.Size.X - GridPart.Size.X,GridPart.Size.X do
for z = 0,GridBase.Size.Z - GridPart.Size.Z,GridPart.Size.Z do
local newPart = GridPart:Clone()
newPart.Parent = GridBase
newPart.Position = (gridCorner + Vector3.new(x,GridBase.Position.Y + 0.01,z)) + GridPart.Size/2
end
end