So I got this button, its supposed to Open a menu when left clicked and close it when clicked again. But I get "Button1Down is not a valid member of TextButton". Heres the code:
local open = script.Parent
local box = open.Frame
local map = box.Map
local pic = box.Mapic
open.Button1Down:connect(function(mouse)
open.Text = "Close"
map, box, pic.Visible = true
if open.Text == "Close" and open.Button1Down then
open.Text = "Teleport Menu"
map, box, pic.Visible = false
end
end)
Not sure why it's saying this or what I am supposed to do about it. It's in a local script that's inside the button btw. Help please? :)

3 comments
It helped for the click part but still nothing comes up. But now there's nothing in the output xD Thumbs up anyways. :D
Never mind I got it working, couldn't use map, box, pic. I had to do them separately. Thanks. :)
Button1Down is an event for the mouse.