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
 

Re: How to use the onKeydown function?

Previous Thread :: Next Thread 
789cab is not online. 789cab
Joined: 13 Jul 2009
Total Posts: 3145
05 Dec 2011 05:33 PM
How do I use it?
Report Abuse
789cab is not online. 789cab
Joined: 13 Jul 2009
Total Posts: 3145
05 Dec 2011 05:37 PM
Help
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
05 Dec 2011 05:47 PM
Do you have the player's mouse?
Report Abuse
Vampire32100 is not online. Vampire32100
Joined: 13 Dec 2008
Total Posts: 1058
05 Dec 2011 06:00 PM
This is the basic of it:

function e(mouse)
mouse.KeyDown:connect(function(key)
key = string.lower(key)
if key == "e" then
--Put what happens here
end
end)
end
script.Parent.Equipped:connect(e)
Report Abuse
Penguine236 is not online. Penguine236
Joined: 13 Apr 2011
Total Posts: 1303
05 Dec 2011 06:39 PM
the keyboard and stuff is a part of mouse?
Report Abuse
Vampire32100 is not online. Vampire32100
Joined: 13 Dec 2008
Total Posts: 1058
05 Dec 2011 06:41 PM
mouse can be anything:
function e(ice)
ice.KeyDown:connect(function(key)
key = string.lower(key)
if key == "e" then
--Put what happens here
end
end)
end
script.Parent.Equipped:connect(e)
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