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

what's wrong with this script?

Asked by 10 years ago
local P1 = workspace.AAAAASky.Clouds.P1.Decal.Transparency
local P2 = workspace.AAAAASky.Clouds.P2.Decal.Transparency
local P3 = workspace.AAAAASky.Clouds.P3.Decal.Transparency

while true do
    wait(math.random (10, 20))
    for i = 1, 100 do
        game.Lighting.Brightness = game.Lighting.Brightness - 0.01
        P1.Transparency = P1.Transparency - 0.01
        P2.Transparency = P2.Transparency - 0.01
        P3.Transparency = P3.Transparency - 0.01
        wait(0.01)
    end
    wait(math.random (1, 10))
    script.Rain:Play()
    for i = 1, 100 do
        wait(0.01)
        script.Rain.Volume = script.Parent.Rain.Volume + 0.01
    end
    wait(math.random (1, 10))
    for i = 5, math.random (6, 50) do
        wait(math.random (2, 10))
        game.Lighting.Brightness = 0.8
        script.ThunderSound:Play()
        wait(0.1)
        game.Lighting.Brightness = 0
    end
    wait(math.random (1, 10))
    for i = 1, 100 do
        wait(0.01)
        script.Rain.Volume = script.Parent.Rain.Volume - 0.01
    end
    script.Rain:Stop()
    wait(math.random (1, 10))
    for i = 1, 100 do
        game.Lighting.Brightness = game.Lighting.Brightness + 0.01
        P1 = P1 + 0.01
        P2 = P2 + 0.01
        P3 = P3 + 0.01
        wait(0.01)
    end
end

some reason way at the beginning it's not even looping the P1, P2, and P3, I put "--" in front of line 8 to see if that was the problem but it wasn't, I can't find my errors

0
What does the output print when you run the script? IcyArticunoX 355 — 10y
0
the output never shows it's doing anything, I look through the output and nothing about this script pops up alerttrains123 10 — 10y
0
Where is this script? Goulstem 8144 — 10y
0
located in Lighting alerttrains123 10 — 10y
View all comments (2 more)
0
If the script is in Lighting, then it is Suspended, meaning it will not run. :P TheeDeathCaster 2368 — 10y
0
I moved it into Workspace, fixed the errors on the lines, now it works, so I have a mad way of getting things working alerttrains123 10 — 10y

Answer this question