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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
| |
|