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

How would I modify this to make one GUI transparent and the other not?

In this script, I want it so that that when the Currency1 is selected, it will show the gui for Currency2 but make Currency1 invisible. What should I change here?

button = script.Parent
window = button.Parent
display = window.Currency1 --  Window = name of object to be opened/closed

function onClicked(GUI)
    if display.Visible == true then --False = Closed
        display.Visible = false 
    else
        display.Visible = true --True = Open
    end
end
script.Parent.MouseButton1Click:connect(onClicked)

2 answers

This issue can be solved using those if statements. if display is Currency1, make it invisible, then make the other gui visible.

button = script.Parent
window = button.Parent
display = window.Currency1 --  Window = name of object to be opened/closed

function onClicked(GUI)
	display.Visible = not display.Visible --if visible is true then it will become false and vice versa
end
script.Parent.MouseButton1Click:connect(onClicked)

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