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 » Scripting Helpers
Home Search
 

Re: Gui Open

Previous Thread :: Next Thread 
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
08 Nov 2012 11:16 PM
ScreenGui
>Frame
>Button
>>Script

function Open(key)
if keyDown:() == "P" then
script.Parent.Parent.Frame.Visible = true
ifelse script.Parent.Parent.Frame.Visible = false
end

Haven't tested this, but I know I'm missing something.
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
09 Nov 2012 07:32 AM
This is a GUI, right...?

script.Parent.MouseButton1Down:connect(function()
if not script.Parent.Parent.Frame.Visible then script.Parent.Parent.Frame.Visible = true
elseif script.Parent.Parent.Frame.Visible then script.Parent.Parent.Frame.Visible = false
end end)

print(string.char(169).."easelessSoul".."|S"..string.char(169).."ripting Helper")
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
09 Nov 2012 09:29 AM
you should use a localscript to get the mouse.KeyDown function triggered :)

local p = game.Players.LocalPlayer

local frame = script.Parent.Parent.Frame

local m = p:getMouse()

local x = false

m.KeyDown:connect(function(key)

if key == "p" then

x = not x
frame.Visible = x

end

end)
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
09 Nov 2012 11:11 AM
Thanks.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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