Advertisement
Elvisfofo_rblx

Rain Parts Script

Jun 22nd, 2025
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. --// Rain Parts Script
  2. local partTemplate = Instance.new("Part")
  3. partTemplate.Size = Vector3.new(3, 3, 3)
  4. partTemplate.Anchored = false
  5. partTemplate.BrickColor = BrickColor.Random()
  6. partTemplate.Material = Enum.Material.Neon
  7. partTemplate.Shape = Enum.PartType.Block
  8. partTemplate.TopSurface = Enum.SurfaceType.Smooth
  9. partTemplate.BottomSurface = Enum.SurfaceType.Smooth
  10.  
  11. -- Settings
  12. local dropArea = 200 -- width/length of spawn area
  13. local height = 100 -- how high above the map the parts fall from
  14. local rainRate = 0.1 -- time between drops
  15.  
  16. -- Infinite rain loop
  17. while true do
  18. local clone = partTemplate:Clone()
  19. clone.Position = Vector3.new(
  20. math.random(-dropArea, dropArea),
  21. height,
  22. math.random(-dropArea, dropArea)
  23. )
  24. clone.Parent = workspace
  25. task.wait(rainRate)
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement