I put this in my textbutton and it didnt work idk why
01 | repeat wait() until game.Players.LocalPlayer |
02 | local mouse = game.Players.LocalPlayer:GetMouse() |
03 |
04 | 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 |
05 | local PopUpFrame = script.Parent.Parent.Parent.PopUp --Once again, change this to wherever your frame is located. |
06 | local Button = script.Parent --The script will most likely be in the button |
07 |
08 | function onClick() |
09 | if PopUpFrame.Visible = = true then |
10 | PopUpFrame.Visible = false |
11 |
12 | elseif PopUpFrame.Visible = = false then |
13 | PopUpFrame.Visible = true |
14 | end |
15 | end |
16 |
17 | Button.MouseButton 1 Click:connect(onClick) |
01 | wait( 5 ) |
02 | local player = game.Players.LocalPlayer |
03 | local mouse = Player:GetMouse() |
04 |
05 | 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 |
06 | local PopUpFrame = script.Parent.Parent.Parent.PopUp --Once again, change this to wherever your frame is located. |
07 | local Button = script.Parent --The script will most likely be in the button |
08 |
09 | function onClick() |
10 | if PopUpFrame.Visible = = true then |
11 | PopUpFrame.Visible = false |
12 |
13 | elseif PopUpFrame.Visible = = false then |
14 | PopUpFrame.Visible = true |
15 | end |
16 |
17 |
18 | Button.MouseButton 1 Click:connect(onClick) |
repeat wait() until game.Players.LocalPlayer (Unnecessary) Just use waitfordataready() k.