Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How do I make a Lightning and Rain Script?

Asked by 10 years ago

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

Log in to vote
0
Answered by 10 years ago

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

0
Nope, Didn't work. ;( Electrolyke 0 — 10y
Ad

Answer this question