I need help making an text button opening a frame

Hey, Im a very new programmer as you can see, im currently trying to make a story based game that lets you choose a gamemode then a map. I got the “play button” working which opens up the main menu GUI where they can select a game mode. After that they can select the map they want to play on however Im struck trying to get the button that opens up the map selection GUI to work… I got the play button to open up the GUIs but I cant seem to get the map selection GUI to open. Originally I was going to hide all the GUIs and make the map selection visible, however the button ends up doing nothing. Naturally I suspected it that it has something to do something with the fact I was hiding the rest of the GUIs so I decided to just keep everything and let the map selection cover the menu GUIs. However the issue still seems to persist. Sorry if you find the issue trivial lol i just feel a bit lost

Below I attached my code for the text button that is supposed to open the “Map selection frame”

local p = script.Parent
local menu = script.Parent.Parent.menuFrame
local c = script.Parent.Parent.menuFrame.CasualButton
local r = script.Parent.Parent.menuFrame.RankedButton

script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.MapSelection.Visible = true
end)

Here is a ss of my explorer

image

5 Likes
-- LocalScript
-- Put this script in a button

script.Parent.MouseButton1Click:Connect(function()

local frame = [frameLocation]
frame.Visible = -- false or true (false closes, true opens)
-- repeat as many times as you want for as many frames/gui 
-- that support "Visible"

end)
4 Likes

Did you want to make MapSelection Visible?

Then I don’t know lol. I just gave you the basic script for “closing” a GUI.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.