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: Keydown being deprecated.

Previous Thread :: Next Thread 
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
17 Aug 2015 09:26 AM
It's been awhile since I coded something in roblox, what should I use instead of it?
Report Abuse
Drakles is not online. Drakles
Joined: 19 Oct 2014
Total Posts: 1066
17 Aug 2015 09:29 AM
UserInputService.

local uis = game:GetService("UserInputService");

uis.InputBegan:connect(function(input, event)
if not event then
if input.KeyCode == Enum.KeyCode.E then
print("E has been pressed!");
end
end
end)

Life is short, so grip it and rip it.
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
17 Aug 2015 10:53 AM
How about KeyPressed?, I checked the wiki but couldn't figure out which event was right for the job.
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
17 Aug 2015 11:18 AM
Nvm got it.
Report Abuse
lupine is not online. lupine
Joined: 24 Jun 2008
Total Posts: 3561
17 Aug 2015 11:45 AM
Oooh, I hadn't heard about the new UserInputService. Thanks Drakles.
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
17 Aug 2015 11:46 AM
Here: http://www.roblox.com/Forum/ShowPost.aspx?PostID=168541568

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
71428 is not online. 71428
Joined: 06 Aug 2015
Total Posts: 339
17 Aug 2015 11:46 AM
"local uis = game:GetService("UserInputService");

uis.InputBegan:connect(function(input, event)
if not event then
if input.KeyCode == Enum.KeyCode.E then
print("E has been pressed!");
end
end
end)"

I've seen this before but wasn't sure how it was used. Now I get it. Thanks
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