xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
| |
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
|
| 27 Oct 2012 11:19 AM |
| i just used the serach function and realised i posted an answer to my question on a different thread. |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 27 Oct 2012 11:24 AM |
Well don't do that again! Ok?
All aboard the bandwagon. |
|
|
| Report Abuse |
|
|
Legend26
|
  |
| Joined: 08 Sep 2008 |
| Total Posts: 10586 |
|
| |
|
Garnished
|
  |
| Joined: 09 Apr 2012 |
| Total Posts: 12695 |
|
|
| 27 Oct 2012 11:56 AM |
^ Just search up Tool.Equipped fire. |
|
|
| Report Abuse |
|
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
|
| 27 Oct 2012 12:07 PM |
@legend
it's because the tool gets reparented into character and the script runs again and fires the equipped event again for some reason.
easy fix:
function onToolEquip(mouse) if tool.Parent == character then return end character = tool.Parent end tool.Equipped:connect(onToolEquip)
function onToolDeEquip() character = nil end tool.Unequipped:connect(onToolDeEquip) |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 27 Oct 2012 12:50 PM |
I wouldn't rely on that "easy fix" too much.
Use debounce methods instead. |
|
|
| Report Abuse |
|
|