RichEyez
|
  |
| Joined: 12 Apr 2012 |
| Total Posts: 234 |
|
|
| 23 Jun 2014 08:54 PM |
local Player = Game.Players.LocalPlayer; --Get the player local Mouse = Player:GetMouse(); --Get the mouse
Mouse.KeyDown:connect(function(Key) if (Key:lower() == "r") then if (Player.Character ~= nil) then Player.PlayerGui.ScreenGui.TextButton.Visible = false end end end)
So basicly, This script closes a gui. How do I re open that gui when I press the button after that? |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2014 09:03 PM |
local Player = Game.Players.LocalPlayer; --Get the player local Mouse = Player:GetMouse(); --Get the mouse
Mouse.KeyDown:connect(function(Key) if (Key:lower() == "r") then if (Player.Character ~= nil) then Player.PlayerGui.ScreenGui.TextButton.Visible = !Player.PlayerGui.ScreenGui.TextButton.Visible end end end)
Tell me if this works. |
|
|
| Report Abuse |
|
|
RichEyez
|
  |
| Joined: 12 Apr 2012 |
| Total Posts: 234 |
|
| |
|
|
| 23 Jun 2014 09:07 PM |
local Player = Game.Players.LocalPlayer; --Get the player local Mouse = Player:GetMouse(); --Get the mouse
Mouse.KeyDown:connect(function(Key) if (Key:lower() == "r") then if (Player.Character ~= nil) then Player.PlayerGui.ScreenGui.TextButton.Visible = not Player.PlayerGui.ScreenGui.TextButton.Visible end end end) |
|
|
| Report Abuse |
|
|