i tried doing this mutable ways but, seems to not be working.
game.StarterGui.MainMenu.Background.Visible = false
i tried doing this mutable ways but, seems to not be working.
game.StarterGui.MainMenu.Background.Visible = false
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)
do i gotta add in a click function or something?
its also saying, MainMenu is not a Valid member of player.
Add a close button for the menu, and add a localscript in.
Wait, i will update the answer.
See, the answer, it should work correctly.
connect is deprecated please do not give deprecated code
Sorry, i didn't know connect is deprecated.
i figured it out, thanks tho :D
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
It's not supposed to be StarterGui, its supposed to be PlayerGui