iNeoR
|
  |
| Joined: 03 Jun 2017 |
| Total Posts: 60 |
|
|
| 15 Aug 2017 11:08 AM |
so i made a button that popups a gui, now i want it so that if the player clicks the shop button again, it will close the shop Heres the button script : script.Parent.MouseButton1Click:connect(function() game.Players.LocalPlayer.PlayerGui:WaitForChild("ShopGui"):WaitForChild("ShopFrame").Visible = true print ("gui has been loaded") end)
wow |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2017 11:11 AM |
local done=false local gui=(shop frame location)
script.Parent.MouseButton1Down:Connect(function() if not done then done=true gui.Visible=true elseif done then done=false gui.Visible=fasle end end) |
|
|
| Report Abuse |
|
|
KingKamII
|
  |
| Joined: 21 Oct 2016 |
| Total Posts: 471 |
|
|
| 15 Aug 2017 11:11 AM |
if statement
A wise man once told me that life is a mirror... |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2017 11:13 AM |
local ShopFrame = game.Players.LocalPlayer.PlayerGui:WaitForChild("ShopGui"):WaitForChild("ShopFrame")
script.Parent.MouseButton1Click:Connect(function() ShopFrame.Visible = not ShopFrame.Visible end)
|
|
|
| Report Abuse |
|
|