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

how do i make my main menu disappear?

Asked by 6 years ago

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

game.StarterGui.MainMenu.Background.Visible = false
0
It's not supposed to be StarterGui, its supposed to be PlayerGui TheOnlySmarts 233 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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)
0
do i gotta add in a click function or something? User#21093 0 — 6y
0
its also saying, MainMenu is not a Valid member of player. User#21093 0 — 6y
0
Add a close button for the menu, and add a localscript in. LinKiNSpitZ 22 — 6y
0
Wait, i will update the answer. LinKiNSpitZ 22 — 6y
View all comments (4 more)
0
See, the answer, it should work correctly. LinKiNSpitZ 22 — 6y
0
connect is deprecated please do not give deprecated code User#19524 175 — 6y
0
Sorry, i didn't know connect is deprecated. LinKiNSpitZ 22 — 6y
0
i figured it out, thanks tho :D User#21093 0 — 6y
Ad

Answer this question