|
| 11 Feb 2013 04:16 PM |
What is wrong with this?
function OnClick() if Clicked == true then game.StarterGui.ScreenGui.TextBox.Visible=false game.StarterGui.ScreenGui.TextButton.Visible=salfe end end
sorry but it in't using the indents. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 04:19 PM |
Clicked is nil. No connection line. Forums dont like whitespace because stupidity. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 04:21 PM |
so it would be game.StarterGui.ScreenGui.TextButton.connect:(OnClick)
|
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 04:30 PM |
Its OBJECT.EVENT:connect(FUNCTION)
And it should be the item you want to change. NOT game.StarterGui... but something like script.Parent |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 04:34 PM |
I'm sorry that I need all this help but it is the first i ever tried to make. So will this work?
function OnClick() if Clicked == true then game.StarterGui.ScreenGui.TextButton.Visible=true game.StarterGui.ScreenGui.TextBox.Visible=true end end
script.Parent.StarterGui.Parent.ScreenGui.Parent.TextButton.connect:(function(OnClick) |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 04:44 PM |
Put this in the screen gui
--[[REMOVED THE IF STATMENT (DOES NOTHING AS CLICKED IS NIL) REPLACED ALL THE STARTERGUI STUFF WITH THE ACTUAL GUI FIXED THE CONNECTION LINE]]
function OnClick() script.Parent.TextButton.Visible=true script.Parent.TextBox.Visible=true end
script.Parent.TextButton.MouseButton1Down:connect(OnClick)
|
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 04:49 PM |
| I used the script you sent and it doesn't work. Is it supposed to be in the textbutton or workspace? |
|
|
| Report Abuse |
|
|