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

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

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)

4 comments

0

'script.Parent.Parent.Frame.BackgroundTransparency' should be set to 1 at line 10, if that is what you want.

1

What he said ^

1

What the she said ^

1

"Have you tried turning it off and on again"

1 answer

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

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