|
| 08 Jan 2014 01:22 PM |
| Everytime I press R it makes that same noise over and over again because it's a spam reload. What do I do to prevent it? |
|
|
| Report Abuse |
|
|
VilleSlay
|
  |
| Joined: 14 May 2011 |
| Total Posts: 1405 |
|
|
| 08 Jan 2014 01:35 PM |
Debounce.
example:
local running = false
function TEST() if not running then--If the function is NOT running, then it will proceed. running = true--Indicates the function is running. --Source running = false--Indicates the function is "over". else--Incase the function is running. wait() end end
~~> Ville <~~ |
|
|
| Report Abuse |
|
|
| |
|
VilleSlay
|
  |
| Joined: 14 May 2011 |
| Total Posts: 1405 |
|
|
| 08 Jan 2014 01:49 PM |
In the reload function sounds pretty fair.
~~> Ville <~~ |
|
|
| Report Abuse |
|
|