Advertisement
IMAKESCRIPTSATSCHOOL

Infinite Terrain

Feb 20th, 2022
604
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. local Y_Level = 0 --Put the height you want the parts to spawn at here.
  2.  
  3. local WaitTime = 1.5 --Time between spawning and deleting.
  4.  
  5. -- These are color and material settings.
  6. local Settings = {
  7.    
  8.     Material = "Grass",
  9.     Color = BrickColor.Green(), --BC only.
  10.     Size = Vector3.new(400, 10, 400),
  11.     PartParent = workspace
  12.    
  13. }
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24. --code
  25. game:GetService("Players").PlayerAdded:Connect(function(plr)
  26.     wait()
  27.     wait()
  28.     while true do
  29.         local part = Instance.new("Part",Settings.PartParent) part.Size = Settings.Size part.Material = Settings.Material part.Anchored = true
  30.         part.BrickColor = Settings.Color
  31.         part.Position = plr.Character:FindFirstChild("Head").Position
  32.         part.Position = Vector3.new(part.Position.X, Y_Level, part.Position.Z)
  33.         wait(WaitTime)
  34.         part:Destroy()
  35.     end
  36. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement