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

how do i make my main menu disappear?

i tried doing this mutable ways but, seems to not be working.

game.StarterGui.MainMenu.Background.Visible = false

1 comment

0

It's not supposed to be StarterGui, its supposed to be PlayerGui

1 answer

✓ Accepted answer

Do you want it to disappear when a player presses a button or something?

In any case, the problem is that you must access the GUI frame of the specific player.

game.Players.LocalPlayer.MainMenu.Background.Visible = false

It must be in a LocalScript.

Edit:

Add a close button for the menu, and add a LocalScript in the button:

script.Parent.MouseButton1Click:connect(function()

	game.Players.LocalPlayer.PlayerGui.Mainmenu.Background.Visible = false

end)

8 comments

0

do i gotta add in a click function or something?

0

its also saying, MainMenu is not a Valid member of player.

0

Add a close button for the menu, and add a localscript in.

0

Wait, i will update the answer.

0

See, the answer, it should work correctly.

0

connect is deprecated please do not give deprecated code

0

Sorry, i didn't know connect is deprecated.

0

i figured it out, thanks tho :D

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