✓ Accepted answer
Firstly, I noticed you we're using an Array of Text Strings so before, we can do anything. We will need to require those messages by using a simple method:
for i,v in pairs(Sayings) do
We will also need to determine how fast the message is typed by using:
for i = 1, #v.Text do
Now, we can begin on the UI stuff and making the message type out. We can achieve this by using:
script.Parent.Text = string.sub(v.Text, 1, i)
wait(0)
That is all that sorted and your final code should look like this:
local UI = script.Parent
local debounce = false
local Sayings = {
{Text = "Hello, I am a test message 1"},
{Text = "Hello, I am a test message 2"},
{Text = "Hello, I am a test message 3"},
}
wait(5)
for i,v in pairs(Sayings) do
wait(3)
for i = 1, #v.Text do
script.Parent.Text = string.sub(v.Text, 1, i)
wait(0)
end
end
I hope this helped you out.