drgn42
|
  |
| Joined: 11 Feb 2010 |
| Total Posts: 3231 |
|
|
| 27 Jan 2015 09:04 AM |
| How do I add 1 to an int value until they unpress the key? Let's just assume they're pressing f. |
|
|
| Report Abuse |
|
|
SLY3
|
  |
| Joined: 10 Jul 2008 |
| Total Posts: 1700 |
|
|
| 27 Jan 2015 09:29 AM |
local key = 's' local m = plr:GetMouse() val = 0 m.KeyDown:connect(function(k) local x = k:lower() if x == key then down = true m.KeyUp:connect(function(z) local p = z:lower() if p == key then down = false end end) repeat wait() val = val + 1 until down = false end end) |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
| |
|