Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// Rain Parts Script
- local partTemplate = Instance.new("Part")
- partTemplate.Size = Vector3.new(3, 3, 3)
- partTemplate.Anchored = false
- partTemplate.BrickColor = BrickColor.Random()
- partTemplate.Material = Enum.Material.Neon
- partTemplate.Shape = Enum.PartType.Block
- partTemplate.TopSurface = Enum.SurfaceType.Smooth
- partTemplate.BottomSurface = Enum.SurfaceType.Smooth
- -- Settings
- local dropArea = 200 -- width/length of spawn area
- local height = 100 -- how high above the map the parts fall from
- local rainRate = 0.1 -- time between drops
- -- Infinite rain loop
- while true do
- local clone = partTemplate:Clone()
- clone.Position = Vector3.new(
- math.random(-dropArea, dropArea),
- height,
- math.random(-dropArea, dropArea)
- )
- clone.Parent = workspace
- task.wait(rainRate)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement