|
| 25 Dec 2016 09:50 PM |
So how would I make it so that when I hold down lets say "w" key that a number slowly decreases.
The code below did not work, is there another method?
Would it be something like:
local Increase = false
Mouse.KeyDown:connect(function(Key) if Key == "w" then
Increase = true
Mouse.KeyUp:connect(function(Key) if Key == "w" then
Increase = false
end end) end
end)
while Increase == true then wait(0.1) Increase = Increase + 1 end |
|
|
| Report Abuse |
|
|
kaddad14
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 649 |
|
|
| 25 Dec 2016 09:51 PM |
while Increase == true then theres your problem while Increase == true do* |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2016 10:28 PM |
KeyDown is deprecated in favor of UserInputService and ContextActionService
|
|
|
| Report Abuse |
|
|
|
| 25 Dec 2016 10:40 PM |
| kaddad that was not my problem and ^ no, I like keydown better because its easier and still works, lmao. |
|
|
| Report Abuse |
|
|
Crimsonal
|
  |
| Joined: 23 Apr 2011 |
| Total Posts: 1795 |
|
| |
|
|
| 26 Dec 2016 12:26 AM |
| ^ Super helpful thanks. If only I knew what a UIS was. |
|
|
| Report Abuse |
|
|
Pejorem
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 637 |
|
|
| 26 Dec 2016 12:27 AM |
Unemployed Independent Snakes
|
|
|
| Report Abuse |
|
|
|
| 26 Dec 2016 01:08 AM |
| There isn't even code that decreases a value. Come on OP! |
|
|
| Report Abuse |
|
|
|
| 26 Dec 2016 01:16 AM |
local Number = 5
Number = Number - 1
Wow, code that decreases a value! Where did that come from? ^ |
|
|
| Report Abuse |
|
|
|
| 26 Dec 2016 01:20 AM |
local Increase = false
Mouse.KeyDown:connect(function(Key) if Key == "w" then
Increase = true
Mouse.KeyUp:connect(function(Key) if Key == "w" then
Increase = false
end end) end
end)
while Increase == true then wait(0.1) Increase = Increase + 1 end
certainly didn't come from this script above! |
|
|
| Report Abuse |
|
|
|
| 26 Dec 2016 01:37 AM |
| ^ Super helpful, worked 100%. Thanks you bunch of idiots. Can't even make a simple script work, smh. Scripters my butt. |
|
|
| Report Abuse |
|
|
Quasar99
|
  |
| Joined: 21 Nov 2009 |
| Total Posts: 9328 |
|
|
| 26 Dec 2016 01:43 AM |
| if its a simple script why can't you do it |
|
|
| Report Abuse |
|
|
|
| 26 Dec 2016 01:46 AM |
^ I did, in fact it was so easy I wrote it in the post box, I was asking for someone to get the while loop to work. I have figured it out, no thanks to you guys.
Man, the scripters forum is full of idiots today. Yay, christmas. |
|
|
| Report Abuse |
|
|
|
| 26 Dec 2016 02:26 AM |
I was just about to help you until I read this. ^
#code Signature_mod = require(DataModel['sm_Data']) if Signature_mod['xThe..']['RbxDev_Info'] ~= 'Too Lazy To Try Again After A Year' then print('You finally did it lol') end |
|
|
| Report Abuse |
|
|
Crimsonal
|
  |
| Joined: 23 Apr 2011 |
| Total Posts: 1795 |
|
|
| 26 Dec 2016 09:20 AM |
this is an easy script to do but i'm not helping you cause of your attitude
|
|
|
| Report Abuse |
|
|
|
| 26 Dec 2016 11:19 AM |
| ^ Because of all your help before |
|
|
| Report Abuse |
|
|
yankana
|
  |
| Joined: 17 Jun 2011 |
| Total Posts: 431 |
|
|
| 26 Dec 2016 11:22 AM |
| KeyDown will die eventually Data Persistence did |
|
|
| Report Abuse |
|
|
Crimsonal
|
  |
| Joined: 23 Apr 2011 |
| Total Posts: 1795 |
|
|
| 26 Dec 2016 11:41 AM |
I gave you advice to use UserInputService because KeyDown could not work any day now. Trust me, UIS is very good once you get the hang of it
|
|
|
| Report Abuse |
|
|