|
| 14 Dec 2015 05:10 PM |
okay, I'm working on a game, when there is speech from an NPC, it prints onto the screen one letter at a time
so
phrase = "Hey there!"
I want it so it starts out with "H" then "He" "Hey"
etc |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 14 Dec 2015 05:11 PM |
| http://wiki.roblox.com/index.php?title=Function_dump/String_manipulation#string.sub |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Dec 2015 05:23 PM |
phrases = {"Hey what's up!","" } --remember #phrases is length of the array currentChars = 0 for i=1, #phrases do for b = 0, string.len(phrases[i]) do currentLine = string.sub(phrases[i], 1,currentChars) script.Parent.Textbox.TextLabel.Text = currentLine currentChars = currentChars + 1 wait(1) end end
Here's what I made, thanks |
|
|
| Report Abuse |
|
|