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

How do I make these 3 buttons disappear and make an About GUI?

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?

3 comments

0

I realized I made a mistake in the code. On line 9, I should have done = true.

0

Updated my answer.

0

Still won't work.

1 answer

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)

8 comments

0

Sorry, the answer didn't help.

0

What errors are you getting?

0

It just won't work. :/ I put it in a local script. And still, nothing.

0

Any errors? Or just nothing?

0

Just nothing.

0

WAIT THERE IS ONE ERROR Players.DragonBallFan100.PlayerGui.MainMenu.Frame.LocalScript:2: attempt to index a nil value

0

Try it now.

0

Nothing :(

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