|
| 10 Sep 2011 04:13 PM |
blocks = {} size = Vector3.new(4,4,4) started = 0
for i = 1,100 do started = started + 1 p = Instance.new("Part") p.Parent = game.Workspace p.Size = size p.BrickColor = BrickColor.new("Bright green") p.Anchored = true table.insert(blocks,p) if started == 1 then p.Position = Vector3.new(0,0,0) elseif started > 1 then p.Position = blocks[#blocks.Position] = blocks[#blocks.Position] + Vector3.new(0,4,0) end end
Output : Workspace.Script:16: unexpected symbol near '=' |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2011 04:14 PM |
| It's suppose to create a tall tower of green blocks. I kinda don't wanna players to see flat land hand-made and just generated ores. |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2011 04:17 PM |
Try this:
blocks = {} size = Vector3.new(4,4,4) started = 0
for i = 1,100 do started = started + 1 p = Instance.new("Part") p.Parent = game.Workspace p.Size = size p.BrickColor = BrickColor.new("Bright green") p.Anchored = true table.insert(blocks,p) if started == 1 then p.Position = Vector3.new(0,0,0) elseif started > 1 then for _,v in pairs(blocks) do p.Position = v.Position + Vector3.new(0,4,0) end end end
-Like an __AWESOME__ boss |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2011 04:22 PM |
| Thanks, how would I make it create a perfect 50x50 cube? I don't understand how to check if the line of blocks is long enough to create a new line. |
|
|
| Report Abuse |
|
|