|
| 25 Jun 2013 11:59 PM |
Thanks RoAnt for your help I appreciate it:
local Button = script.Parent local Frame = Button.Parent
function onClick()
Frame.Visible = false
end
Button.MouseButton1Down:connect(onClick)
I was wondering if it is possible to make it so that if you die and you respawn it stays gone. But as of right now it keeps coming back I tried this:
local Button = script.Parent local Frame = Button.Parent
function onClick()
Frame.Parent:Destrot()
end
Button.MouseButton1Down:connect(onClick)
But it still doesn't stay away. Help Please! Thanks! And also I am a beginner with scripting :3 |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2013 12:00 AM |
| It was Frame.Parent:Destroy() |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 26 Jun 2013 12:23 AM |
Try using the debounce technique.
exe:
gatey = false
If gatey == true then return end . gatey == true . --Insert script here end
|
|
|
| Report Abuse |
|
|
|
| 26 Jun 2013 12:26 AM |
I was about to say
Remove =/= Destroy
== Sometimes fear is the proper answer == |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2013 12:28 AM |
| The debounce technique didn't work. And if I remove Destroy and replace it with .Visible it still will keep coming back |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2013 12:30 AM |
| You need a script that sets a variable in the player that the GUI has been deselected and before setting it visible check that variable. I'd suggest a boolvar, but you can use other variables. |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2013 12:31 AM |
| I have no idea how to use a boolvar |
|
|
| Report Abuse |
|
|
RoAnt
|
  |
| Joined: 14 Jul 2008 |
| Total Posts: 16794 |
|
|
| 26 Jun 2013 12:32 AM |
Okay, transfer this to a local script.
local Button = script.Parent local Frame = Button.Parent local Player = game.Players.LocalPlayer
if Player:FindFirstChild("CLICKE__D") then Frame.Visible = false end
function onClick()
Frame.Visible = false local part = Instance.new("Part",Player) part.Name = "CLICKE__D"
end
Button.MouseButton1Down:connect(onClick) |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2013 12:39 AM |
| I transferred it should it stay where the old script was? |
|
|
| Report Abuse |
|
|
RoAnt
|
  |
| Joined: 14 Jul 2008 |
| Total Posts: 16794 |
|
| |
|
|
| 26 Jun 2013 12:45 AM |
| Finally got this Gui to work after 4 hours! THANKS a million RoAnt!!! |
|
|
| Report Abuse |
|
|