Trying to make a close UI but a glitch broke it

Hello! Im trying to make a play gui

But the Issue is whenever I click the button it only takes the background off and leaves all of the text

I cant find anything relivant to what Im trying to achive on youtube, dev forum and roblox developer articles

local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
	player.PlayerGui.Menu.MenuFrame.Visible = false
end)
3 Likes

You don’t have the rest of the text into MenuFrame

3 Likes

This happens in the Output

< Output >
16:26:41.707 FlopZone auto-recovery file was created - Studio - C:/Users/mrtix/Documents/ROBLOX/AutoSaves
16:26:42.403 ServerScriptService.SaveData:5: Expected identifier when parsing expression, got ‘end’ - Studio - SaveData:5
16:26:45.502 Players.NubblyFry.PlayerGui.ShopGui.ShopFrame.Tix Value.Tix Currency Counter:7: Expected ‘end’ (to close ‘function’ at line 3), got ; did you forget to close ‘function’ at line 5? - Studio - Tix Currency Counter:7
16:26:45.503 Players.NubblyFry.PlayerGui.ShopGui.ShopFrame.Storz Value.Storz Currency Counter:7: Expected ‘end’ (to close ‘function’ at line 3), got ; did you forget to close ‘function’ at line 5? - Studio - Storz Currency Counter:7
16:28:31.927 AvatarButton is not a valid member of Frame “Players.NubblyFry.PlayerGui.Menu.MenuFrame” - Client - Resume Script:4
16:28:31.928 Stack Begin - Studio
16:28:31.928 Script ‘Players.NubblyFry.PlayerGui.Menu.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:28:31.928 Stack End - Studio
16:28:32.110 AvatarButton is not a valid member of Frame “Players.NubblyFry.PlayerGui.Menu.MenuFrame” - Client - Resume Script:4
16:28:32.110 Stack Begin - Studio
16:28:32.110 Script ‘Players.NubblyFry.PlayerGui.Menu.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:28:32.111 Stack End - Studio
16:28:32.326 AvatarButton is not a valid member of Frame “Players.NubblyFry.PlayerGui.Menu.MenuFrame” - Client - Resume Script:4
16:28:32.326 Stack Begin - Studio
16:28:32.326 Script ‘Players.NubblyFry.PlayerGui.Menu.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:28:32.326 Stack End - Studio
16:28:32.510 AvatarButton is not a valid member of Frame “Players.NubblyFry.PlayerGui.Menu.MenuFrame” - Client - Resume Script:4
16:28:32.510 Stack Begin - Studio
16:28:32.510 Script ‘Players.NubblyFry.PlayerGui.Menu.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:28:32.510 Stack End - Studio
16:28:32.676 AvatarButton is not a valid member of Frame “Players.NubblyFry.PlayerGui.Menu.MenuFrame” - Client - Resume Script:4
16:28:32.676 Stack Begin - Studio
16:28:32.676 Script ‘Players.NubblyFry.PlayerGui.Menu.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:28:32.677 Stack End - Studio
16:28:33.009 AvatarButton is not a valid member of Frame “Players.NubblyFry.PlayerGui.Menu.MenuFrame” - Client - Resume Script:4
16:28:33.009 Stack Begin - Studio
16:28:33.009 Script ‘Players.NubblyFry.PlayerGui.Menu.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:28:33.009 Stack End - Studio
16:28:33.326 AvatarButton is not a valid member of Frame “Players.NubblyFry.PlayerGui.Menu.MenuFrame” - Client - Resume Script:4
16:28:33.326 Stack Begin - Studio
16:28:33.326 Script ‘Players.NubblyFry.PlayerGui.Menu.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:28:33.327 Stack End - Studio
16:28:33.676 AvatarButton is not a valid member of Frame “Players.NubblyFry.PlayerGui.Menu.MenuFrame” - Client - Resume Script:4
16:28:33.676 Stack Begin - Studio
16:28:33.677 Script ‘Players.NubblyFry.PlayerGui.Menu.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:28:33.677 Stack End - Studio

this is the script
< Script >

local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
	player.PlayerGui.Menu.MenuFrame.AvatarButton.PlayButton.ShopButton.Visible = false
end)
2 Likes

It’s really confusing, could you give a picture of the Explorer so we actually know where everything is located at?

The first and the second script you’ve posted are completly different ones, which makes it confusing.

The issue is probably happening because those texts are not in the MenuFrame, so when you make it invisible those will not.

3 Likes

??? why was the post withdraw little confused

2 Likes

Their not " text " their actually text buttons

1 Like

Well I deleted it because I think I misunderstood the question when I read it.

2 Likes

Yeah, you see in the image none of those TextButtons are inside MenuFrame, so technically when you make MenuFrame invisible those TextButtons will not be made invisible.

You can try fixing this by putting the TextButtons inside MenuFrame, or else you’ll need to make a loop which will make every children of ‘Menu’ invisible.

4 Likes

What’s the name of the script?

2 Likes

Resume Script

thats the name of the script

1 Like

< Output >
16:49:46.282 FlopZone auto-recovery file was created - Studio - C:/Users/mrtix/Documents/ROBLOX/AutoSaves
16:49:47.021 ServerScriptService.SaveData:5: Expected identifier when parsing expression, got ‘end’ - Studio - SaveData:5
16:49:51.527 Players.NubblyFry.PlayerGui.ShopGui.ShopFrame.Tix Value.Tix Currency Counter:7: Expected ‘end’ (to close ‘function’ at line 3), got ; did you forget to close ‘function’ at line 5? - Studio - Tix Currency Counter:7
16:49:51.527 Players.NubblyFry.PlayerGui.ShopGui.ShopFrame.Storz Value.Storz Currency Counter:7: Expected ‘end’ (to close ‘function’ at line 3), got ; did you forget to close ‘function’ at line 5? - Studio - Storz Currency Counter:7
16:50:47.890 MenuFrame is not a valid member of Player “Players.NubblyFry” - Client - Resume Script:4
16:50:47.890 Stack Begin - Studio
16:50:47.891 Script ‘Players.NubblyFry.PlayerGui.Menu.MenuFrame.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:50:47.891 Stack End - Studio
16:50:48.524 MenuFrame is not a valid member of Player “Players.NubblyFry” - Client - Resume Script:4
16:50:48.525 Stack Begin - Studio
16:50:48.525 Script ‘Players.NubblyFry.PlayerGui.Menu.MenuFrame.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:50:48.525 Stack End - Studio
16:50:48.724 MenuFrame is not a valid member of Player “Players.NubblyFry” - Client - Resume Script:4
16:50:48.725 Stack Begin - Studio
16:50:48.725 Script ‘Players.NubblyFry.PlayerGui.Menu.MenuFrame.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:50:48.725 Stack End - Studio
16:50:48.926 MenuFrame is not a valid member of Player “Players.NubblyFry” - Client - Resume Script:4
16:50:48.927 Stack Begin - Studio
16:50:48.927 Script ‘Players.NubblyFry.PlayerGui.Menu.MenuFrame.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:50:48.927 Stack End - Studio
16:50:49.124 MenuFrame is not a valid member of Player “Players.NubblyFry” - Client - Resume Script:4
16:50:49.124 Stack Begin - Studio
16:50:49.124 Script ‘Players.NubblyFry.PlayerGui.Menu.MenuFrame.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:50:49.124 Stack End - Studio
16:50:49.308 MenuFrame is not a valid member of Player “Players.NubblyFry” - Client - Resume Script:4
16:50:49.308 Stack Begin - Studio
16:50:49.309 Script ‘Players.NubblyFry.PlayerGui.Menu.MenuFrame.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:50:49.309 Stack End - Studio
16:50:53.958 MenuFrame is not a valid member of Player “Players.NubblyFry” - Client - Resume Script:4
16:50:53.958 Stack Begin - Studio
16:50:53.958 Script ‘Players.NubblyFry.PlayerGui.Menu.MenuFrame.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:50:53.958 Stack End - Studio
16:50:54.158 MenuFrame is not a valid member of Player “Players.NubblyFry” - Client - Resume Script:4
16:50:54.160 Stack Begin - Studio
16:50:54.161 Script ‘Players.NubblyFry.PlayerGui.Menu.MenuFrame.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:50:54.162 Stack End - Studio
16:50:54.458 MenuFrame is not a valid member of Player “Players.NubblyFry” - Client - Resume Script:4
16:50:54.458 Stack Begin - Studio
16:50:54.459 Script ‘Players.NubblyFry.PlayerGui.Menu.MenuFrame.PlayButton.Resume Script’, Line 4 - Studio - Resume Script:4
16:50:54.459 Stack End - Studio
16:51:17.109 Disconnect from ::ffff:127.0.0.1|58779 - Studio

It didnt work at all and I gotta move stuff back now

2 Likes

If you are doing this from “Resume Script” then through those errors we can see that you’re trying to get MenuFrame inside the Player, but It’s actually in Player.PlayerGui.Menu.MenuFrame

Make sure everything is inside MenuFrame, you can also test this while you’re playing, by going into the explorer while in-game and setting MenuFrame invisible to true. (It’s located in the Player.PlayerGui)

2 Likes

Their all in menu frame already tho

Just looking at your first script, it seems like you’re only making the frame invisible. Try doing this.

local player = game:GetService("Players").LocalPlayer

script.Parent.Activate:Connect(function()
    player.PlayerGui.Menu.Enabled = false
end)

This script should make the whole GUI turn off.

2 Likes

didnt work it does nothing to the Gui

Place all of the textbuttons into one Mainframe, then you can change the visible property of the Mainframe to make all of the childs invisible.

1 Like

There’s definetly something weird going on here, as those solutions should have been working.

Please try debugging your code, such as checking if you’re actually triggering the MouseClick connection, if the script is actually getting the Menu, If there are any errors related to that code etc.

1 Like

like I said, the parent of all of the text boxes and stuff are the child of the MenuFrame

how do you do the debuging thing?

From the picture no they are not inside the menu frame, just below it.

1 Like