|
| 07 Jan 2015 07:20 PM |
How do I make text appear letter by letter? And does it work in the output?
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 07 Jan 2015 07:21 PM |
http://wiki.roblox.com/index.php?title=Function_dump/String_manipulation
Idk uselike stringlength and whatnot |
|
|
| Report Abuse |
|
|
Chrapnel
|
  |
| Joined: 01 Feb 2014 |
| Total Posts: 951 |
|
|
| 07 Jan 2015 07:25 PM |
depends if the text changes or not
--if it doesn't change print('A') wait(1) print('AB') wait(1) print('ABC') wait(1) print('ABCD')
--if it does local table = {a,b,c,d] print (table[1]) wait(1) print (table[1]..table[2]) wait(1) print (table[1]..table[2]..table[3]) wait(1) print (table[1]..table[2]..table[3]..table[4])
your name is ironic |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2015 07:25 PM |
I really have some difficulties understanding the wiki, can you show me an example?
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
Funse
|
  |
| Joined: 11 Jun 2012 |
| Total Posts: 7887 |
|
| |
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 07 Jan 2015 07:26 PM |
Lol no That's a horrible way of doing it. |
|
|
| Report Abuse |
|
|
goro7
|
  |
| Joined: 01 Jul 2009 |
| Total Posts: 735 |
|
|
| 07 Jan 2015 07:27 PM |
local text = "Hello"
for i=1,text:len() do script.Parent.Text = text:sub(1,i) end
( ͡° ͜ʖ ͡°) - u wot m8 |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2015 07:27 PM |
Lets say I have a TextLabel, I want my text to be animated like. For example Text = "Hello" I want TextLabel.Text to start with the letter H and end with O (every .1 seconds, a letter appears.)
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2015 07:28 PM |
Sorry I didn't see the later replies, I'll try. Thanks.
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 07 Jan 2015 07:29 PM |
goro gave it to you Just add a wait or something lol |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2015 07:34 PM |
@goro7 If I add wait(), it seems to wait the waits between each letter and then make the text appear at once. or in other words, doesn't work.
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Jan 2015 07:37 PM |
local function type(o, p, s, r) local x = tick() for x = 1, #s, 1 do o[p] = s:sub(1, x) wait(r and (math.random() / 4) or 0.03) end return (tick() - x); end
local message = Instance.new("Message", workspace) type(message, "Text", "Hello how are you doing?")
local model = Instance.new("Model", workspace) type(model, "Name", "Hello I am a model how do you do?", true) --the last argument being true makes it a little random |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2015 07:41 PM |
I think there is a simpler way... xD
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Jan 2015 07:43 PM |
| That way is extremely simple |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2015 07:45 PM |
I cant even understand it. Sorry :/ The thing is that I've seen how its done. But I forget where and how.
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Jan 2015 07:47 PM |
local function type(object, property, _string, random) for x = 1, #_string, 1 do object[property] = _string:sub(1, x) wait(random and (math.random() / 4) or 0.03) end end
There understand it better? |
|
|
| Report Abuse |
|
|