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 you find out how many characters in string?

Previous Thread :: Next Thread 
ScriptMasterMatt is not online. ScriptMasterMatt
Joined: 01 Sep 2009
Total Posts: 1164
02 May 2014 10:44 PM
If I had a text label, how would I detect how many characters are in the text?
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
02 May 2014 10:49 PM
string.len()
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
02 May 2014 10:49 PM
`local Length = string.len( TextLabel.Text )`

`local Length = TextLabel.Text:len()` also works, but it is just a "pretty" way to write the same thing as the first snippet.

You'd obviously need to define the variable 'TextLabel' in both examples.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
02 May 2014 10:50 PM
TextLabel = script.Parent --Change to what it is, example; script.Parent.Label

NChars = #TextLabel.Text
Report Abuse
ScriptMasterMatt is not online. ScriptMasterMatt
Joined: 01 Sep 2009
Total Posts: 1164
02 May 2014 10:55 PM
Thank ya :]
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
02 May 2014 10:56 PM
No problem :D
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