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: Enum/KeyCode Help

Previous Thread :: Next Thread 
1billybob1 is not online. 1billybob1
Joined: 15 Jun 2008
Total Posts: 4852
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 is online. UFAIL2
Joined: 14 Aug 2010
Total Posts: 6905
22 Dec 2015 12:41 PM
string.char
Report Abuse
1billybob1 is not online. 1billybob1
Joined: 15 Jun 2008
Total Posts: 4852
22 Dec 2015 12:43 PM
Oh yeah, thanks!
Report Abuse
1billybob1 is not online. 1billybob1
Joined: 15 Jun 2008
Total Posts: 4852
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
1billybob1 is not online. 1billybob1
Joined: 15 Jun 2008
Total Posts: 4852
22 Dec 2015 12:49 PM
So is there no way to convert '50' into "Two" easily?
Report Abuse
ElectoStriking is not online. ElectoStriking
Joined: 10 May 2014
Total Posts: 1547
22 Dec 2015 12:51 PM
divide by 25 xD
Report Abuse
1billybob1 is not online. 1billybob1
Joined: 15 Jun 2008
Total Posts: 4852
22 Dec 2015 12:52 PM
STRING my friend. I need the STRING OF "TWO". not another value... pls someone.
Report Abuse
ElectoStriking is not online. ElectoStriking
Joined: 10 May 2014
Total Posts: 1547
22 Dec 2015 12:53 PM
it was bantz
Report Abuse
spyspace12 is not online. spyspace12
Joined: 16 Nov 2012
Total Posts: 615
22 Dec 2015 12:54 PM
I don't think there is anyway on ROBLOX to do that unless you used variables.
Report Abuse
1billybob1 is not online. 1billybob1
Joined: 15 Jun 2008
Total Posts: 4852
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
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
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 is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
22 Dec 2015 01:00 PM
Have you tried it?

Enum.KeyCode[variable]
Report Abuse
1billybob1 is not online. 1billybob1
Joined: 15 Jun 2008
Total Posts: 4852
22 Dec 2015 01:01 PM
found a solution.
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
22 Dec 2015 01:02 PM
ok thx for sharing it
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
22 Dec 2015 01:03 PM
^
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
22 Dec 2015 01:04 PM
Enum.KeyCode.Name
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
22 Dec 2015 01:04 PM
Enum.KeyCode.One.Name ****

floodchecj gtfo
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