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: Example script needed

Previous Thread :: Next Thread 
HyroadCoder is not online. HyroadCoder
Joined: 15 Jul 2014
Total Posts: 813
11 Aug 2014 04:44 PM
i need a little example showing how you take a string and print 1 letter at a time.
Example:

"H" "Hi"

First and second print results.

I need it for an advanced effect in my game. Thanks!
Report Abuse
Alexware is online. Alexware
Joined: 07 May 2010
Total Posts: 661
11 Aug 2014 04:46 PM
You mean a Hint?
Report Abuse
HyroadCoder is not online. HyroadCoder
Joined: 15 Jul 2014
Total Posts: 813
11 Aug 2014 04:52 PM
No.. idk

Just a script that does something like this:

mystring = "Hello!"

for i = 1,#mystring do
print(i)
end

But that would print each letter. Well idk it might cause an error. Point is I want it to get the length of the string, and print them out like this:

"H" "He" "Hel" "Hell" "Hello" "Hello!" One letter at a time. I saw another post regarding this and I forgot the code.
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
11 Aug 2014 04:54 PM
Is this what you want?,
mystring = "Hello!"

for i = 1,#mystring do
print(mystring:sub(0,i))
end
Report Abuse
HyroadCoder is not online. HyroadCoder
Joined: 15 Jul 2014
Total Posts: 813
11 Aug 2014 04:58 PM
Exactly! Thanks!
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