So I have a String value in ReplicatedStorage. The goal is to update the gui and make it say the string value. I'm trying to make it like it is typing the value by itself. This is the code I have but It is only printing one letter everytime the string value changes.
local status = game.ReplicatedStorage:WaitForChild("StatVal")
function statUpdate()
local val = status.Value
local letter = nil
for i = 0,string.len(val) do
letter = string.sub(val,i,i)
script.Parent.Text = letter
end
end
status.Changed:Connect(statUpdate)

1 comment
I'm pretty sure lua substrings start at 1 so ignore the i = 0