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 » Scripting Helpers
Home Search
 

Re: How do I replace a string within a string?

Previous Thread :: Next Thread 
cybercircut is not online. cybercircut
Joined: 28 Jan 2011
Total Posts: 280
07 Nov 2014 09:58 PM
I want to change something like:
"lvl783925"
to just
"lvl"
How do I do this?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
07 Nov 2014 10:00 PM
gsub
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
07 Nov 2014 10:01 PM
Codepad;
BDhJfYRg


for some reason its blocked
Report Abuse
jakej78b is not online. jakej78b
Joined: 09 Mar 2011
Total Posts: 813
07 Nov 2014 10:01 PM
string.sub("lvl783925", 3)
Report Abuse
cybercircut is not online. cybercircut
Joined: 28 Jan 2011
Total Posts: 280
07 Nov 2014 10:05 PM
The problem is, the first 3 letters were an example, so using that value every time wont work.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
07 Nov 2014 10:06 PM
use mine
Report Abuse
cybercircut is not online. cybercircut
Joined: 28 Jan 2011
Total Posts: 280
07 Nov 2014 10:10 PM
Yours is nonsense
Report Abuse
iwishforpie1 is not online. iwishforpie1
Joined: 20 Mar 2011
Total Posts: 1423
07 Nov 2014 10:17 PM
I laugh sometimes.

script.Parent.Text = "lvl" .. That.Level.Value

or what ever there

"lvl" .. That.Level.Value
Report Abuse
cybercircut is not online. cybercircut
Joined: 28 Jan 2011
Total Posts: 280
07 Nov 2014 10:32 PM
Thats for joining strings, I want to separate them.
Report Abuse
Altlightpower26 is not online. Altlightpower26
Joined: 28 Oct 2014
Total Posts: 37
07 Nov 2014 10:37 PM
string.find("lvl8645442", "lvl")
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
07 Nov 2014 10:38 PM
You've already been given the answer, manipulate it to your uses.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
07 Nov 2014 11:01 PM
'Yours is nonsense'

Mine works.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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