Skip to content

Instantly share code, notes, and snippets.

@compscitwilight
Created August 31, 2022 05:52
Show Gist options
  • Save compscitwilight/a7b4030aa4ff3ad4fe36a5113d67d2df to your computer and use it in GitHub Desktop.
Save compscitwilight/a7b4030aa4ff3ad4fe36a5113d67d2df to your computer and use it in GitHub Desktop.
weird terrain generator
local gen = 1000
function generate(i)
local num = math.random(0, i)
local part = Instance.new("Part")
part.BrickColor = BrickColor.random()
part.Anchored = true
part.Parent = workspace
part.Position = Vector3.new(num * 2, 1, num * 3) * math.random(0, 200)
part.Size = Vector3.new(num * 20, 50 + math.random(50), num * 20)
end
for i = 0, gen, 1 do
generate(i)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment