local ogtile = map.Background_Tile
ogtile.Parent = map.Tiles
local row = ogtile.Position
for i = 1,512 do
local tileclone = ogtile:Clone()
tileclone.Parent = map.Tiles
tileclone.Position = row
row = tileclone.Position+tileclone.CFrame.RightVector*-tileclone.Size.X
local col = tileclone.Position+tileclone.CFrame.UpVector*tileclone.Size.Y
for j = 2,512 do
local tileclone = tileclone:Clone()
tileclone.Parent = map.Tiles
tileclone.Position = col
col = tileclone.Position+tileclone.CFrame.UpVector*tileclone.Size.Y
end
end
Hi you should have some waiting periods between spawning in your objects, otherwise the server will get exhausted quite quickly. In the sample below, we have a wait between each row, but you can always chop your total amount of tiles into chunks of 10, 25 or 50 ect. When that is said:
local RowX = 100
local RowZ = 100
for CurX = 1, RowX do
for CurZ = 1, RowZ do
local NewTile = Tile:Clone()
NewTile.Position = Vector3.new(NewTile.Size.X*CurX,0,NewTile.Size.Z*CurZ)
NewTile.Parent = workspace
end
task.wait()
end
Your script works really well, but is there a way I can make it so that it generates from a specific point?
The starting position vector3 is 1022, -1022, 5.5.
edit: never mind i figured it out, I just subtracted numbers from the vector3.
local e = 0
for CurX = 1, RowX do
for CurY = 1, RowY do
local NewTile = ogtile:Clone()
NewTile.Position = Vector3.new(NewTile.Size.X*CurX-startPos.X,NewTile.Size.Y*CurY+startPos.Y,0+startPos.Z)
NewTile.Parent = map.Tiles
e += 1
end
task.wait()
end
print(e)
local e = 0
for CurX = 1, RowX do
for CurY = 1, RowY do
local NewTile = ogtile:Clone()
NewTile.CFrame = CFrame.new(NewTile.Size.X*CurX-startPos.X,NewTile.Size.Y*CurY+startPos.Y,0+startPos.Z)
NewTile.Parent = map.Tiles
e += 1
end
task.wait()
end
print(e)
for CurX = 1, RowX do
for CurY = 1, RowY do
local NewTile = ogtile:Clone()
NewTile.CFrame = CFrame.new(NewTile.Size.X*CurX-startPos.X,NewTile.Size.Y*CurY+startPos.Y,0+startPos.Z)
NewTile.Parent = map.Tiles
e += 1
if not NewTile then
print("ahh")
end
end
task.wait()
end
print(e)
Your script works, wait time or not, but it seems to be a rendering issue. The “invisible” part is indeed that; simply invisible…It does exist, and if you change a property or even move the part it will reappear. I’m unsure as to what the solution for this would be, possibly adjusting the rendering property of the tiles or even something as simple as changing the transparency of all parts to “0” after creating them all.
I think the answer is to either change your rendering engine in Lighting, or just turn “CastShadow” off of your template brick. Tested it a few times and it worked but can’t guarantee anything. Hope it helps!
I did a couple more things and it works. If 01 studio doesn’t release the people playground multiplayer mod then damn, I’m gonna have to make people playground 2.5D w/ multiplayer just so I can play with my friend lol