|
| 02 Aug 2013 06:54 PM |
Button1 = game.StarterGui.ScreenGui.Image1
function onTouch() Button1.Visible = true wait(.5) Button1.Visible = false end
Button1.Touched:connect(onTouch)
output: 18:52:49.593 - Touched is not a valid member of ImageButton 18:52:49.593 - Script "Workspace.House1.Button1.Script", Line 9 18:52:49.593 - stack end
|
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Aug 2013 06:55 PM |
Wrong event. Button1.MouseButton1Click:connect(onTouch) |
|
|
| Report Abuse |
|
|
Jtmt88
|
  |
| Joined: 07 Jun 2008 |
| Total Posts: 4346 |
|
|
| 02 Aug 2013 06:55 PM |
Button1.MouseButton1Down:connect(function() Button1.Visible = true wait(.5) Button1.Visible = false end)
Touched is for parts. MouseButton1Down is for GUIs. |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2013 06:57 PM |
| well it has to happen when someone touchs a brick not clicking on it. |
|
|
| Report Abuse |
|
|
Jtmt88
|
  |
| Joined: 07 Jun 2008 |
| Total Posts: 4346 |
|
|
| 02 Aug 2013 06:59 PM |
| One question: how do you touch a GUI with your character? |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2013 07:00 PM |
"Touched is not a valid member of ImageButton"
An ImageButton is totally a brick. |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2013 07:01 PM |
| i said they touch a "brick" and the gui becomes visible they dont touch the gui... |
|
|
| Report Abuse |
|
|
| |
|
| |
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 02 Aug 2013 07:28 PM |
this script has too many errors
try this instead
function onTouch(hit) local p = game.Players:GetPlayerFromCharacter(hit.Parent) if hit then p.PlayerGui.ScreenGui.Image1.Visible = true end end
script.Parent.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
DrWaffler
|
  |
| Joined: 16 Sep 2011 |
| Total Posts: 4248 |
|
|
| 02 Aug 2013 07:29 PM |
Stop arguing with the people who actually know how to script.
They didn't lie to you.
I am reborn as an ocelot. You disapprove. |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2013 07:34 PM |
| im not arguing im saying what it was supposed to do. |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2013 07:39 PM |
| well it connects but it doesnt turn on the Gui |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 02 Aug 2013 07:39 PM |
| Well we are trying to say that you are trying to connect to a non-existent event. There is no Touched event of any Gui. You must connect to the event of the brick you want to touch, otherwise, the script doesn't know what brick you're trying to touch (or, in this case, what you're even attempting to accomplish.) |
|
|
| Report Abuse |
|
|