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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|