|
| 02 Oct 2016 03:41 PM |
I want to know if a the InputObject matches the variable string.
How do I get "A" from Enum.KeyCode.A, etc? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 02 Oct 2016 03:45 PM |
| I don't suppose there's anyway to get "4" from "Four"? |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Oct 2016 03:46 PM |
local uis = game:GetService('UserInputService')
uis.InputBegan:connect(function(input,event) if event then return end local key,enum = input.KeyCode,Enum.KeyCode if key == enum['A'] then print('A') end end)
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 02 Oct 2016 03:46 PM |
Flux that's literally (nearly) the same thing I wore in 2012 and for a second I thought I was on gametest
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 04:16 PM |
'I don't suppose there's anyway to get "4" from "Four"?' Here's one way: Enum.KeyCode.NUMBER.Value - 48
|
|
|
| Report Abuse |
|
|