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 » Scripting Helpers
Home Search
 

Key down.

Previous Thread :: Next Thread 
Mzh3000 is not online. Mzh3000
Joined: 22 Jan 2009
Total Posts: 4967
21 Dec 2011 12:42 PM
I have it so when you press a key, it runs a certian thing once.

What line of code is there to check if they key is still being pressed.
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
21 Dec 2011 12:55 PM
if key == "e" then
print("Muhahahhah I pressed it")
end

There :D
Report Abuse
Trapper4O77 is not online. Trapper4O77
Joined: 03 Aug 2011
Total Posts: 5648
21 Dec 2011 12:56 PM
I was wondering that too, thanks!
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
21 Dec 2011 12:56 PM
if key == "e" then
print("Muhahahhah I pressed it")
end
---if you want another line, you put elseif
elseif key == "p" then
print("Muhahahhah I pressed it")
end
Report Abuse
Mzh3000 is not online. Mzh3000
Joined: 22 Jan 2009
Total Posts: 4967
21 Dec 2011 01:00 PM
Well I already understand that. D:

I am tryig to get it to check if the key is still down, and if it isnt then just end.
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
21 Dec 2011 01:01 PM
Hmm...
Report Abuse
Mzh3000 is not online. Mzh3000
Joined: 22 Jan 2009
Total Posts: 4967
21 Dec 2011 01:07 PM
Gawt it


mouse.KeyUp:connect(function(key) if key=="f" then herpderp=false end end)
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
21 Dec 2011 01:13 PM
I bet 'herpderp' is 'true' right?

add this

herpderp = true
Report Abuse
Mzh3000 is not online. Mzh3000
Joined: 22 Jan 2009
Total Posts: 4967
21 Dec 2011 01:17 PM
yes herpderp is true XD
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
21 Dec 2011 01:20 PM
I knew it! By the way, good luck learning about Lua :D
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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