Alright, this script takes a target of a string and prints it out one by one, however, I'm getting an error and I'm not sure why.
Not working
MainDest = script.Parent.speechLabel
String = "Why this no work.."
function Speak(message, target)
for i = 1, message:len() do
wait()
target.Text = message:Sub(1,i)
end
end
wait(1)
Speak(String, MainDest)
Error:
8: attempt to call method 'Sub' (a nil value)
Working without function
for i = 1, String:len() do
wait()
Message.Text = String:sub(1,i)
end
Any help would be great! Thanks!

2 comments
.-. mg thank you so much, lol.
@VirusMetic, Lua is case sensitive. If it doesn't work one way, try the other way.