kakbroek1
|
  |
| Joined: 16 Dec 2013 |
| Total Posts: 136 |
|
|
| 16 Sep 2014 12:29 PM |
ready = true function onTouched(touch) if touch.Parent:findFirstChild("Humanoid") then local s = game.Players:GetPlayerFromCharacter(touch.Parent) if ready then s.PlayerGui.ScreenGui.ScrollingFrame.Foto3.Visible = true wait(1) ready = false end end end
game.Workspace.Key1.ClickDetector.MouseClick:connect(onTouched)
why this script dont works |
|
|
| Report Abuse |
|
|
kakbroek1
|
  |
| Joined: 16 Dec 2013 |
| Total Posts: 136 |
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 16 Sep 2014 02:06 PM |
| Does it work at the first time then don't work at the second time you pressed it? |
|
|
| Report Abuse |
|
|
kakbroek1
|
  |
| Joined: 16 Dec 2013 |
| Total Posts: 136 |
|
| |
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 16 Sep 2014 02:39 PM |
As I explained earlier, a ClickDetector passes you the Player object, not the Character object.
ready = true function onTouched(touch) if ready then touch.PlayerGui.ScreenGui.ScrollingFrame.Foto3.Visible = true wait(1) ready = false end end
game.Workspace.Key1.ClickDetector.MouseClick:connect(onTouched) |
|
|
| Report Abuse |
|
|
kakbroek1
|
  |
| Joined: 16 Dec 2013 |
| Total Posts: 136 |
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 16 Sep 2014 03:19 PM |
| Wow I did I not spot that problem >.< |
|
|
| Report Abuse |
|
|