generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

gui problems lol

Previous Thread :: Next Thread 
iNeoR is not online. 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
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
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 is online. 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
GNUnotUNIX is not online. GNUnotUNIX
Joined: 05 Feb 2012
Total Posts: 15171
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image