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

GUI button not working can anyone help me?

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

✓ Accepted answer

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.

1 comment

0

Thanks for telling my mistake now the script works fine. Thanks again :)

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