dribson
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 13635 |
|
|
| 01 Nov 2011 04:01 PM |
I haven't worked with scripts in a while, let alone GUI's. I've been able to get these to work, but not right now.
function onMouseButton1Down() script.Parent.Text = " " end
script.Parent.MouseButton1Down.connect:onMouseButton1Down
I know the basics of scripting, I'm just refreshing what I've learned and trying new techniques. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 01 Nov 2011 04:03 PM |
script.Parent.MouseButton1Down:connect(function() script.Parent.Text = " " end) |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2011 04:03 PM |
Here is a fixed version:
function onMouseButton1Down() script.Parent.Text = "" end
script.Parent.MouseButton1Down.connect(onMouseButton1Down)
Or, to be more efficient:
script.Parent.MouseButton1Down.connect(function script.Parent.Text = "" end)
|
|
|
| Report Abuse |
|
|
|
| 01 Nov 2011 04:05 PM |
function onMouseButton1Down() script.Parent.Text = "" end
script.Parent.MouseButton1Down.connect(onMouseButton1Down)
--[[ the above is correct :) ]] |
|
|
| Report Abuse |
|
|
dribson
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 13635 |
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 01 Nov 2011 04:08 PM |
"Or, to be more efficient: script.Parent.MouseButton1Down.connect(function"
(function()*
Anyway, anonymous functions aren't more efficient/less efficient, both the same (Depending on what you;re wanting to do) |
|
|
| Report Abuse |
|
|