|
| 24 Jul 2011 12:10 PM |
i get things like:
function onClick(mouse)
but i dont know any listeners. can some1 help with a example? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 28 Jul 2011 11:26 PM |
bump = true
function bumb(post if bump == true then post 'bumped' end end
bump()
|
|
|
| Report Abuse |
|
|
|
| 28 Jul 2011 11:30 PM |
Here is a .touch example. :)
function t(hit)
end script.Parent.Touch:connect(t)
Here is an anonymous function
script.Parent.Touched:connect(function(hit)
end)
There are two examples. :) |
|
|
| Report Abuse |
|
|
RawrBot
|
  |
| Joined: 22 Aug 2008 |
| Total Posts: 832 |
|
|
| 28 Jul 2011 11:35 PM |
If you want a tool to do something when you click, insert a normal script in the tool like this:
--No-name functions are more efficient
tool.Activated:connect(function() print("Mouse has clicked") end)
tool.Unequipped:connect(function()
print("Unequipped")
end)
I'm not sure, just try around. Look in free models. (Btw, LocalScripts in tools are to control the mouse and keys, like change the icon) Search mouse in the wiki. |
|
|
| Report Abuse |
|
|