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: HELP

Previous Thread :: Next Thread 
TjazBuilder is not online. TjazBuilder
Joined: 27 Sep 2013
Total Posts: 845
18 Jun 2016 06:13 AM
How could i store a string value to an int value?

Like.. when someone writes a number and clicks the button.. it would copy the string from the textbox and then the string would be copied to an int value.

HELP?!?


#code Tags --- My Robux status - R$103 Please play my game GTA - BLOXLAND!
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
18 Jun 2016 06:16 AM
You would use tonumber()

So,
IntValue.Value = tonumber(TextBox.Text)
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
18 Jun 2016 06:18 AM
but a Textbox-to-number setup is not safe, because they could input letters and symbols, the like of which you cannot convert with tonumber() ... X)
Report Abuse
TjazBuilder is not online. TjazBuilder
Joined: 27 Sep 2013
Total Posts: 845
18 Jun 2016 06:18 AM
Thanks! I'll try to disable letters!


#code Tags --- My Robux status - R$103 Please play my game LOTTERY PLAZA
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
18 Jun 2016 06:24 AM
You can use string manipulation and just remove anything besides numbers when they enter them in.
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
18 Jun 2016 06:24 AM
But tonumber will remove them so you don't have to unless you want it to look nice.
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