i have tried it. i tried this code Box = script.Parent:WaitForChild("Box") Button = script.Parent:WaitForChild("OpenAndClose") Open = false
Button.MouseButton1Down:connect(function(open) if Open == false then Button.Text = "Close" Box.Visible = true Open = true elseif Open == true then Button.Text = "Open" Box.Visible = false Open = false end end)?
and many otheres but they dont work please elp.
Make sure this is a local script:
01 | Box = script.Parent:WaitForChild( "Box" ) |
02 | Button = script.Parent:WaitForChild( "OpenAndClose" ) |
03 | Open = false |
04 |
05 | Button.MouseButton 1 Down:connect( function (open) |
06 | if Open = = false |
07 | then Button.Text = "Close" |
08 | Box.Visible = true |
09 | Open = true |
10 | elseif Open = = true then |
11 | Button.Text = "Open" |
12 | Box.Visible = false |
13 | Open = false |
14 | end |
15 | end ) |