|
| 28 Sep 2011 08:11 AM |
| 'Button1down' functions or however for use in tools, is there any tutorials for them? |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2011 09:22 AM |
| Not entieley sure, but I think the call is MouseButton1Down. |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 28 Sep 2011 09:48 AM |
MouseButton1Down is the left-click event for GUI Buttons.
Tool:
script.Parent.Equipped:connect(function(m) m.Button1Down:connect(function() --[[do something]] end) m.Button2Down:connect(function() --[[do something for this right mouse-click]] end) m.KeyDown:connect(function(key) if key == "keyletter" then --[[Do something]] elseif key == "keyletter2" then --[[Do something]] end end) end)
Hopperbin:
script.Parent.Selected:connect(function(m) m.Button1Down:connect(function() --[[do something]] end) m.Button2Down:connect(function() --[[do something for this right mouse-click]] end) m.KeyDown:connect(function(key) if key == "keyletter" then --[[Do something]] elseif key == "keyletter2" then --[[Do something]] end end) end) |
|
|
| Report Abuse |
|
|