Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Better way of using strings effectively?

Asked by 4 years ago

if your confused this code lets me easily make a type writer effect.

local function tex(mes)
for i = 1, #mes do
script.Parent.Text = string.sub(mes, 1, i)
wait (0.04)
end
end


tex("Hey! help me")
wait(2)
tex("thanks let me up now")
wait(2)
tex("ok hurry")
wait(2)
tex("thanks")

im pretty sure there's a better way doing this it's making my code hard to edit and clunky

i was thinking of using tables like this

words = {"Hey! help me","thanks let me up now","ok hurry","thanks"}

Answer this question