generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Increase Steadily

Previous Thread :: Next Thread 
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
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 is not online. 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
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
25 Dec 2016 10:28 PM
KeyDown is deprecated in favor of UserInputService and ContextActionService


Report Abuse
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
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 is not online. Crimsonal
Joined: 23 Apr 2011
Total Posts: 1795
25 Dec 2016 11:54 PM
use uis


Report Abuse
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
26 Dec 2016 12:26 AM
^ Super helpful thanks. If only I knew what a UIS was.
Report Abuse
Pejorem is not online. Pejorem
Joined: 10 Apr 2012
Total Posts: 637
26 Dec 2016 12:27 AM
Unemployed Independent Snakes


Report Abuse
SoapyDishy is not online. SoapyDishy
Joined: 31 Aug 2015
Total Posts: 2169
26 Dec 2016 01:08 AM
There isn't even code that decreases a value. Come on OP!
Report Abuse
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
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
SoapyDishy is not online. SoapyDishy
Joined: 31 Aug 2015
Total Posts: 2169
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
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
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 is not online. 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
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
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
Sen_Takatsuki is not online. Sen_Takatsuki
Joined: 07 Aug 2013
Total Posts: 673
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 is not online. 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
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
26 Dec 2016 11:19 AM
^ Because of all your help before
Report Abuse
yankana is not online. yankana
Joined: 17 Jun 2011
Total Posts: 431
26 Dec 2016 11:22 AM
KeyDown will die eventually Data Persistence did
Report Abuse
Crimsonal is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image