✓ Accepted answer
It's exactly what the error message says. The Text property expected a string value, but you gave it a table value. If you want to make a text read strings from a table, you're going to have to iterate the table with a for loop, and assign each one of those individual texts to that textlabel. Like this:
local Texts = {
"TESTING",
"MEMES"
}
for i,v in ipairs(Texts)do
MainBarText.Text = v
wait(1)
end
for i = 0,1,0.1 do
MainBarText.TextTransparency = i
wait()
end
for i,v in ipairs(Texts)do
MainBarText.Text = v
wait(1)
end
for i = 1,0,-0.1 do
MainBarText.TextTransparency = i
wait()
end
Now, we could actually make this a bit cleaner by making a function that changes the text for us, using the same for loop. Like this:
local Texts = {
"TESTING",
"MEMES"
}
local function IterateTexts(Table, Time)
for i,v in ipairs(Table)do
MainBarText.Text = v
wait(Time)
end
end
IterateTexts(Texts, 1)
for i = 0,1,0.1 do
MainBarText.TextTransparency = i
wait()
end
IterateTexts(Texts, 1)
for i = 1,0,-0.1 do
MainBarText.TextTransparency = i
wait()
end
Hope this helped.