I put this in my textbutton and it didnt work idk why
repeat wait() until game.Players.LocalPlayer
local mouse = game.Players.LocalPlayer:GetMouse()
local FirstFrame = script.Parent.Parent --Or wherever your first frame is, the text button is likely inside of it, so this is what you'd usally put
local PopUpFrame = script.Parent.Parent.Parent.PopUp --Once again, change this to wherever your frame is located.
local Button = script.Parent --The script will most likely be in the button
function onClick()
if PopUpFrame.Visible == true then
PopUpFrame.Visible = false
elseif PopUpFrame.Visible == false then
PopUpFrame.Visible = true
end
end
Button.MouseButton1Click:connect(onClick)

1 comment
You don't need the first 2 lines..and if this is a localscript then just put it in a regular script..and remove all the 'local's before the variables named.