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

Why this script not removing the whole gui but leaving screen black?

Asked by
22To 70
8 years ago

This is the script thats in the play button, it fades away but it leaves the screen black and you cant see anything.

script.Parent.MouseButton1Click:connect(function()
    local a = 1
    script.Parent.Parent.Frame.BackgroundTransparency = a
    script.Parent.Parent.Frame.Visible = true
    for i = 1,30 do
        script.Parent.Parent.Frame.BackgroundTransparency = a
        a = a - 0.05
        wait()
    end
    script.Parent.Parent.Frame.BackgroundTransparency = 0
    local b = script.Parent.Parent.Parent.Parent.Backpack.CamFix.Sound.Volume
    repeat
        wait(0.3)
        script.Parent.Parent.Parent.Parent.Backpack.CamFix.Sound.Volume = b
        b = b - 0.05
    until script.Parent.Parent.Parent.Parent.Backpack.CamFix.Sound.Volume == 0
    wait(1)
    script.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("White")
    script.Parent.Parent.Parent.Parent.Backpack.CamFix.Sound:Stop()
    script.Parent.Parent.Parent.Parent:LoadCharacter()
end)

0
'script.Parent.Parent.Frame.BackgroundTransparency' should be set to 1 at line 10, if that is what you want. LetThereBeCode 360 — 8y
1
What he said ^ User#9949 0 — 8y
1
What the she said ^ Azmidium 388 — 8y
1
"Have you tried turning it off and on again" User#9949 0 — 8y

1 answer

Log in to vote
0
Answered by
Im_Kritz 334 Moderation Voter
8 years ago
script.Parent.MouseButton1Click:connect(function()
    script.Parent.Parent.Frame.BackgroundTransparency = 0
    script.Parent.Parent.Frame.Visible = true
    for i = 1,30 do
        script.Parent.Parent.Frame.BackgroundTransparency = i / 30
        wait()
    end
    script.Parent.Parent.Frame.BackgroundTransparency = 1
    local b = script.Parent.Parent.Parent.Parent.Backpack.CamFix.Sound.Volume
    repeat
        wait(0.3)
        script.Parent.Parent.Parent.Parent.Backpack.CamFix.Sound.Volume = b
        b = b - 0.05
    until script.Parent.Parent.Parent.Parent.Backpack.CamFix.Sound.Volume == 0
    wait(1)
    script.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("White")
    script.Parent.Parent.Parent.Parent.Backpack.CamFix.Sound:Stop()
    script.Parent.Parent.Parent.Parent:LoadCharacter()
end)


What I did is made it so it would add to the transparency instead of subtracting from it

Ad

Answer this question