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: How can I change the first two digits of something?

Previous Thread :: Next Thread 
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
09 Nov 2015 08:40 PM
Like for my thing to move, I have to use big numbers. I was hoping I could just change my value to be a simple two-digit number, like 01 or something, and then have that number be turned into 010000 for my Vector3. Here is my script so far:

thrust.Force = Vector3.new(0, 0, speed.Value)

Anybody want to help?

u sicko!
Report Abuse
blobbyblob is not online. blobbyblob
Joined: 29 Oct 2008
Total Posts: 12165
09 Nov 2015 08:45 PM
Sounds like all you're doing is multiplying the number by 10000.

thrust.Force = Vector3.new(0, 0, speed.Value * 10000)
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
09 Nov 2015 08:47 PM
*facepalm*
Why is it I thought I would have had to manipulate a string or something when all I needed to do was multiply?
Thank you.

u sicko!
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
09 Nov 2015 08:49 PM
You can always use the tostring method...

Involves tostring() on your value, use some code to take the first two characters and remove them, then tonumber() on the finished string.
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