Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a Lightning and Rain Script?

Now, I have not tried to script this, Mainly because I do not know how to, So. What I want to do, Is make it so the Sky flashes every once in a while, And it will always have a Raining sound, Not "Real" Rain. Just the Sounds and the Flashes in the sky, If anyone can help me. Thank you so much.

1 answer

something like this

x = 3 --Minimum time between lightning strikes
y = 20 --Maximum time between lightning strikes
while true do 
wait(math.random(x,y)
game.Lighting.Brightness = 99
wait(.1)
game.Lighting.Brightness = 1--or whatever you had it originally set to 
end

-- for the music
z = Instance.new("Sound") 
z.Name ="Rain" 
z.SoundId = "" -- link to your rain sound 
z.Volume = 1 
z.Looped = true
z.archivable = false 
z.Pitch = 1
z.Parent = game.Workspace
z:Play()

hope dat helps call me out if i did something wrong

1 comment

0

Nope, Didn't work. ;(

This discussion is preserved as it was. New answers, comments, and votes are closed.