Advertisement
Nutgear

[ROBLOX] [Lua] City maker

Mar 4th, 2018
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. --basename = "Base"
  2.  
  3. function create_city(buildings)
  4.     for i = 1,buildings do
  5.         local building = Instance.new("Part",workspace)
  6.         building.Anchored = true
  7.         building.CanCollide = false
  8.         building.Position = Vector3.new(math.random(-400,400),0,math.random(-400,400))
  9.         building.Size = Vector3.new(50,math.random(30,150),50)
  10.         building.BrickColor = BrickColor.Random()
  11.         building.CanCollide = true
  12.         building.RightSurface = "Inlet"
  13.         building.LeftSurface = "Inlet"
  14.         building.FrontSurface = "Inlet"
  15.         building.BackSurface = "Inlet"
  16.         building.TopSurface = "Smooth"
  17.         building.BottomSurface = "Smooth"
  18.     end
  19. end
  20.  
  21. create_city(15)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement