Typewrite not updating Text

I have a NPC chat system and the typewrite itself works, checked using prints and the script knows where the text is, what the text is, and the other relevant information it needs, problem is it doesn’t want to update my text. I noticed when I try to update the text. Without the type write it doesn’t update the text either.

Could it be because the script is localscript inside of StarerCharacterScripts instead of the GUI its connected to?

v The typewrite v
image
v The system connected to it v

edit: almost forgot to show the variables incase something is wrong there vv
image

You are simply setting the NPCchat variable to newString, you’re not actually changing the Text of the object.

1 Like

Shouldn’t it be updating since NPCchat = newString is inside of the for loop?
image
also still don’t have an answer as to why text wont update even if I attempt to change it without using the typewrite
image

Basically he is saying try NPCchat.Text = newString

1 Like

mistake on my part, forgot to show the variables, but NPCchat is a .Text

And that might be your problem, personally I ALWAYS avoid making variables that reference lets say a .Value or .Text

Instead remove .Text from your variable assignment, and add it to your text assignment. What is most likely happening is Roblox thinking you are re-declaring your variable instead of setting the text

2 Likes

ah… yep, that was the problem.

Thanks for your help!

1 Like