|
| 22 Dec 2015 12:38 PM |
How would I convert the value of a keycode to its string?
For ex, the value of the key 'One' is 50. How would I convert the 50 into its string state ('One')?
|
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
| |
|
| |
|
|
| 22 Dec 2015 12:45 PM |
No wait, still not exactly what I'm looking for.
That converts the value (50), to '2'. I need it to convert it to 'Two', because inputObject needs the word as a string... |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2015 12:49 PM |
| So is there no way to convert '50' into "Two" easily? |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Dec 2015 12:52 PM |
| STRING my friend. I need the STRING OF "TWO". not another value... pls someone. |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Dec 2015 12:54 PM |
| I don't think there is anyway on ROBLOX to do that unless you used variables. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2015 12:55 PM |
| That's so lame then. Why would roblox make it inputObject.KeyCode == Enum.KeyCode.Two when there's no way to convert the value into the string.. BS |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2015 12:57 PM |
because you don't need the string?
if inputObject.KeyCode == Enum.KeyCode.Two then
should work? |
|
|
| Report Abuse |
|
|
cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
|
| 22 Dec 2015 01:00 PM |
Have you tried it?
Enum.KeyCode[variable] |
|
|
| Report Abuse |
|
|
| |
|
| |
|
cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
| |
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
| |
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
|
| 22 Dec 2015 01:04 PM |
Enum.KeyCode.One.Name ****
floodchecj gtfo |
|
|
| Report Abuse |
|
|