local text = "Hello Rats!" wait(2) local text = "Yeah haw" -- This is my Text. for i = 1, #text do script.Parent.Text = string.sub(text, 1, i) wait(0.04) -- Speed of the text Typewriter animation end
You could put the sentences in a table and loop through the table.
--table containing all the sentences sentences = { "Hello Rats!", "Yeah haw", "This is another sentence!" } --Displays current sentence with type writer effect function displaySentence(sentence) for i = 1, #sentence do script.Parent.Text = string.sub(sentence, 1, i) wait(0.04) -- Speed of the text Typewriter animation end end --loop thru all the sentences, displaying each sentence --with a 1 second pause in between each sentence for _, sentence in pairs(sentences) do displaySentence(sentence) wait(1) end