Here should be your answer:
local Button = script.Parent:WaitForChild("TextButton")
local Frame = script.Parent:WaitForChild("Frame")
local On = false
local function OpenClose()
if not On then
Frame.Visible = true
On = true
else
Frame.Visible = false
On = false
end
end
Button.MouseButton1Click:Connect(OpenClose)
Locations:
https://gyazo.com/b3ab8dd68b346daa4accd7a60d36b3f6