How do i make a button make a frame pop up and dissapear but it can also have an x button that makes the frame go away and the button visible
local frame = script.Parent.Parent.Frame
script.Parent.MouseButton1Click:connect(function()
if frame.Visible == false then
frame.Visible = true
else
frame.Visible = false
end
end)
https://web.roblox.com/games/5486860140/Tower-Adventures?refPageId=5a3e4864-1159-4bfe-850d-80e6f4876520 Example is from tower battles play button. Btw im new at coding so posting the full script would help

3 comments
but how do i make the button you press dissapear?
oh simple
There's an easier way which is frame.Visible = not frame.Visible instead of the if else statements