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

GUI button not working can anyone help me?

Asked by 10 years ago

Hi, I made a Menu GUI in with it has 4 buttons. I made a script that when you click the button a GUI will popup and i made a close button but both of those button does not work. Please tell me why it is not working. I made the script using Local Script.

 AboutGUI = script.Parent.AboutGUI
Close = AboutGUI.Close

function CloseAboutGUI()
    AboutGUI.visible =  false

end

function AboutGUIPopup()
    if AboutGUI.Visible ==  false then
       AboutGUI.visible =  true
    else
        AboutGUI.Visible = false
    end
end

About.MouseButton1Down:connect(AboutGUIPopup)
Close.MouseButton1Down:connect(CloseAboutGUI

Thank You for reading or answering :)

1 answer

Log in to vote
0
Answered by
Ekkoh 635 Moderation Voter
10 years ago

One thing I noticed right away is that you're missing a closing parentheses at the end of your script, but I'm assuming that's just a copy paste error. Lua is case-sensitive. That means that .visible and .Visible are two different things. The property is Visible. Make sure to capitalize that every time you use it, otherwise your script looks good.

0
Thanks for telling my mistake now the script works fine. Thanks again :) PlayingOBC 70 — 10y
Ad

Answer this question