DISCLAIMER: My real account is DragonBallFan100. The reason I made this account is because the code to verify my account kept getting blocked because I'm under 13, and I do not want to wait 2 more years.
ANYWAY:
I have 3 buttons on a main menu. The main menu (Frame) is black, and I have 3 buttons on it.
Play, About, and Help.
I want to click About, and make those 3 buttons disappear, and make ANOTHER GUI take the 3 buttons place, and when I click back, I want the About Menu GUI to disappear, and for the 3 buttons to come back. Here's what I tried.
About = game.StarterGui.MainMenu.Frame.About Play = game.StarterGui.MainMenu.Frame.Play Help = game.StarterGui.MainMenu.Frame.Help function(about) About.Visible = false Play.Visible = false Help.Visible = false AboutMenu.Visible end game.StarterGui.MainMenu.Frame.About.MouseButton1Down:connect(about)
What is wrong with this code?
Put this in a LocalScript
What you did wrong You were defining "StarterGui". The service which will only update when a player joins or respawns. You wanted "PlayerGui"
How to fix it
local player = game.Players.LocalPlayer local frame = player:FindFirstChild("MainMenu"):FindFirstChild("Frame") local About = frame.About local Play = frame.Play local Help = frame.Help About.MouseButton1Down:connect(function() About.Visible = false Play.Visible = false Help.Visible = false end)