Dodeca
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 13649 |
|
|
| 17 Jun 2014 06:42 PM |
I'm making a TextButton where if you click it, a script inside of it is disabled
But it's not working..
local char = script.Parent.Parent.Parent.Parent.Parent.Parent.Character local sparkles = char.Torso:FindFirstChild("Sparkles")
script.Parent.MouseButton1Click:connect(function() script.Parent.RB.Disabled = true end) |
|
|
| Report Abuse |
|
|
Tynexx
|
  |
| Joined: 11 Jul 2012 |
| Total Posts: 1559 |
|
|
| 17 Jun 2014 06:44 PM |
local char = script.Parent.Parent.Parent.Parent.Parent.Parent.Character local sparkles = char.Torso:FindFirstChild("Sparkles")
script.Parent.MouseButton1Down:connect(function() script.Parent.RB.Disabled = true end)
|
|
|
| Report Abuse |
|
|
Dodeca
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 13649 |
|
|
| 17 Jun 2014 06:46 PM |
What's the difference between MouseButton1Down and MouseButton1Click??
BTW it did work when I changed it to MouseButton1Down |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Jun 2014 06:54 PM |
| MouseButton1Click initiates when the GUI object is clicked and the pointer is released. MouseButton1Down triggers right when you press the mouse button down rather than after its release. |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2014 06:55 PM |
This doesn't seem like the entire script, also what are the errors?
|
|
|
| Report Abuse |
|
|
Dodeca
|
  |
| Joined: 11 Sep 2011 |
| Total Posts: 13649 |
|
| |
|