so i want to make a typewriter effect and this is the script i have rn
local text = game.ReplicatedStorage.ChatText.Value
script.Parent.Parent.ChatText.Chat.MouseButton1Click:Connect(function()
for i = 1, #text do
script.Parent.TextLabel.Text = string.sub(text, 1, i)
wait(0.04)
end
end)
but when i change the value then it changes to what it was set before i ran the game and it would never update the value
im not sure what im doing wrong here, can someone help me?

2 comments
my output says: 22:22:22.913 - Players.mynam3with123.PlayerGui.ScreenGui.ShowText.LocalScript:9: attempt to get length of a number value and im not sure what it means by that
That means your intended StringValue Object was mistakenly replaced by a NumberValue Instance.