Trying to make a resume UI

This is one way you can do it, though I recommend not using it unless you have a text button to open it in addition, because mobile players don’t have keyboards…

local m = game.Players.LocalPlayer:GetMouse()
m.KeyDown:connect(function(key,mouse)
	key = key:lower()
	if key == "m" then
		script.Parent.Parent.Parent.Parent.Menu.MenuFrame.Visible = false
        --or 
        script.Parent.Parent.Visible = false
        -- either one
	end
end)
1 Like

The games only going to be on computer for now

My bad! I accidentally left the the two lines to say false
change them from this

script.Parent.Parent.Parent.Parent.Menu.MenuFrame.Visible = false
       
script.Parent.Parent.Visible = false

to

script.Parent.Parent.Parent.Parent.Menu.MenuFrame.Visible = true

script.Parent.Parent.Visible = true

What is the error you are getting?

< Output >

  12:02:24.290  ServerScriptService.SaveData:5: Expected identifier when parsing expression, got 'end'  -  Studio  -  SaveData:5
  12:02:28.020  Players.NubblyFry.PlayerGui.ShopGui.ShopFrame.Tix Value.Tix Currency Counter:7: Expected 'end' (to close 'function' at line 3), got <eof>; did you forget to close 'function' at line 5?  -  Studio  -  Tix Currency Counter:7
  12:02:28.021  Players.NubblyFry.PlayerGui.ShopGui.ShopFrame.Storz Value.Storz Currency Counter:7: Expected 'end' (to close 'function' at line 3), got <eof>; did you forget to close 'function' at line 5?  -  Studio  -  Storz Currency Counter:7
  12:03:53.736  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:53.736  Stack Begin  -  Studio
  12:03:53.736  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:53.736  Stack End  -  Studio
  12:03:56.169  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:56.170  Stack Begin  -  Studio
  12:03:56.170  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:56.170  Stack End  -  Studio
  12:03:56.702  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:56.703  Stack Begin  -  Studio
  12:03:56.704  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:56.704  Stack End  -  Studio
  12:03:56.919  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:56.920  Stack Begin  -  Studio
  12:03:56.920  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:56.920  Stack End  -  Studio
  12:03:57.219  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:57.219  Stack Begin  -  Studio
  12:03:57.219  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:57.220  Stack End  -  Studio
  12:03:57.402  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:57.402  Stack Begin  -  Studio
  12:03:57.402  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:57.403  Stack End  -  Studio
  12:03:57.535  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:57.535  Stack Begin  -  Studio
  12:03:57.536  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:57.536  Stack End  -  Studio
  12:03:57.735  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:57.735  Stack Begin  -  Studio
  12:03:57.736  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:57.736  Stack End  -  Studio
  12:03:58.035  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:58.035  Stack Begin  -  Studio
  12:03:58.035  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:58.036  Stack End  -  Studio
  12:03:58.236  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:58.236  Stack Begin  -  Studio
  12:03:58.237  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:58.237  Stack End  -  Studio
  12:03:58.419  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:58.420  Stack Begin  -  Studio
  12:03:58.420  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:58.420  Stack End  -  Studio
  12:03:58.552  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:58.552  Stack Begin  -  Studio
  12:03:58.553  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:58.553  Stack End  -  Studio
  12:03:58.718  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:58.719  Stack Begin  -  Studio
  12:03:58.719  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:58.720  Stack End  -  Studio
  12:04:02.336  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:04:02.337  Stack Begin  -  Studio
  12:04:02.337  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:04:02.337  Stack End  -  Studio
  12:04:03.585  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:04:03.586  Stack Begin  -  Studio
  12:04:03.586  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:04:03.587  Stack End  -  Studio
  12:04:03.936  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:04:03.936  Stack Begin  -  Studio
  12:04:03.936  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:04:03.937  Stack End  -  Studio

Where is this local script in the explorer?

It also may help everyone if you just copy the error once, because they are just duplicates of the same error, it will help you and me a lot.

1 Like

ok sorry about that man ^^||

local print ("Hello World")

don’t worry, we’re all learning!

1 Like

I am guessing either of these two things, either the the local script is in the wrong spot or one of the lines are missing a parent or two, just send a picture of the explorer again…

Ok, so change this

local m = game.Players.LocalPlayer:GetMouse()
m.KeyDown:connect(function(key,mouse)
	key = key:lower()
	if key == "m" then
		script.Parent.Parent.Parent.Parent.Menu.MenuFrame.Visible = true
        --or 
        script.Parent.Parent.Visible = true
        -- either one
	end
end)

to

local m = game.Players.LocalPlayer:GetMouse()
m.KeyDown:connect(function(key,mouse)
	key = key:lower()
	if key == "m" then
		script.Parent.Visible = true
        --or 
        script.Parent.Parent.Parent.ShopGui.ShopFrame.Visible = true
        -- either one
	end
end)
1 Like

It works thanks man for helping me B)

1 Like

were did you learn a lot of scripting from man

This website helped a lot

1 Like

everything looks like It cost a subscription

It does, but I think it might be worth it

And for future reference, whenever you get things like this:

12:03:57.402  Menu is not a valid member of Player "Players.NubblyFry"  -  Client  -  LocalScript:5
  12:03:57.402  Stack Begin  -  Studio
  12:03:57.402  Script 'Players.NubblyFry.PlayerGui.Menu.MenuFrame.LocalScript', Line 5  -  Studio  -  LocalScript:5
  12:03:57.403  Stack End  -  Studio

and things like such and such not a valid member of such and such,
it is a good idea to look at the parents in the script as compared to the explorer
for example, your error

Menu is not a valid member of Player "Players.NubblyFry"


the local script was inside of the MenuFrame, and the code that was giving the error was,

script.Parent.Parent.Parent.Parent.Menu.MenuFrame.Visible = true

what it would be essentially be saying is
script.Parent.Parent.Parent.Parent.Menu.MenuFrame.Visible = true
localscript.MenuFrame.Menu.Player Gui.Player.(and then once it is at the player, it tries to find a menu, but obviously it can’t)

Now, if you are saying to your self, “hmm, localscript.MenuFrame.Menu.Player Gui.Player? What!?” Isn’t supposed to be "localscript.MenuFrame.Menu.Starter Gui.game? (game being the last and final parent, it isn’t specified in the explorer, so don’t worry about it)

To answer that, no it is player gui because, it replicates it to all the players at the start of the game.
Before playing it is like this (my explorer)
Screenshot 2021-01-03 151058
then when it starts playing it still has it in StarterGui,
Screenshot 2021-01-03 151133
But it also puts it in all the players,
Screenshot 2021-01-03 151214
So now it makes more sense…