ROBLOX Rain Script
ROBLOX Rain Script
at
droprate1 = 3 -- for example, if I put "2" here, and "5" below, then it would have
a 2 out of 5 chance of dropping a raindrop.
droprate2 = 3
waittime = 0.1
function Rain()
local drop = Instance.new("Part", Workspace)
drop.Name = "RainDrop"
drop.BrickColor = BrickColor.new("Bright blue")
drop.Transparency = 0.5
drop.Reflectance = 0.4
drop.Position = Vector3.new( math.random(-8, 15) , dropheight , math.random(-14,
4))
drop.FormFactor = "Custom"
drop.Shape = "Block"
drop.Size = Vector3.new(0.2, 0.65, 0.2)
drop.Elasticity = 0 -- We wouldn't want raindrops bouncing would we?
drop.Anchored = false
drop.CanCollide = false -- Raindrops aren't solids! If they were, raining would be
the most common natural disaster.
local s = script.DropScript:clone()
s.Parent = drop
s.Disabled = false
end
while true do
m = math.random(1, droprate2)
if m <= droprate1 then
wait(waittime)
Rain()
else
print("No rain!")
end
end