Could I make this easier for comp?

So I am trying to create a huge grid (contains 90k squeres UI) and as you can tell thats too much. is there any alternative? This is my current script:

for i = 0, 300, 1 do
	for v = 0, 300, 1 do
		local grid = Instance.new("TextLabel", mainGui)
		grid.Text = ""
		grid.Position = UDim2.new(0, plr.PlayerGui.Main.AbsoluteSize.X / 50 * i, 0, plr.PlayerGui.Main.AbsoluteSize.X / 50 * v)
		grid.Size = UDim2.new(0, plr.PlayerGui.Main.AbsoluteSize.X / 50, 0, plr.PlayerGui.Main.AbsoluteSize.X / 50)
	end
end

I always get time exhausted and if I put wait in there I would be waiting for a year to load

1 Like

Question, why do you need 90k text labels?

I want to mae a game similiar game to diep.io and as u might know there are the squeres in the background as decoration

Imo, you could easily do this with a 3d environment while making the camera view and gameplay 2D, along with the use of body movers.

its not about just creating it… I am learning how to script in 2D

I hardly ever see that being a thing, it’s very daring, so if you ever manage to get that far then props to you, because most functionalities are made for 3D environments (with 2D Gameplay as well).

thanks. I will just skip that kind of decoration and try to make something else for visuals. I already scripted tetris and chess in 2D so I am looking forward for this challenge.

1 Like

ow I was just stupid lol, no need to spawn 90k text labels… I can just draw 1200 lines :sweat_smile:

for i = 0, 600, 1 do
	local grid = Instance.new("TextLabel", mainGui)
	grid.Text = ""
	grid.Position = UDim2.new(0, plr.PlayerGui.Main.AbsoluteSize.X / 50 * i, 0, 0)
	grid.Size = UDim2.new(0, 0, 1, 0)
	local grid2 = Instance.new("TextLabel", mainGui)
	grid2.Text = ""
	grid2.Position = UDim2.new(0, 0, 0, plr.PlayerGui.Main.AbsoluteSize.X / 50 * i)
	grid2.Size = UDim2.new(1, 0, 0, 0)
end
1 Like