GUI problem(not related to first one)

I was trying to edit the text on a TextBox with a local script, but I couldn’t find any idea on how to do it. Can anyone help me?
I tried this:
‘’'Lua local GuiText = script.Parent.Text
wait(20)
GuiText = “W”
wait(0.5)
GuiText = “We”
–I’m not gonna finish this, it’s like this and it says Welcome to the lab!
I’m still new to the devforum, I still can’t go into scripting font lol
Thanks
ParkCityUSA

If it’s some sort of text on the screen I would recommend using a textlabel instead of a textbox

You’re using ” which is causing the error
I don’t know if you have a different keyboard but try using " instead:

GuiText = "W"
wait(0.5)
GuiText = "We"
1 Like
local GuiText = script.Parent.Text
wait(20)
GuiText = “W”
wait(0.5)
GuiText = “We”

So the problem with this is that you’re setting the text of the TextBox to be stored in the variable GuiText. Let’s say that script.Parent.Text is "Hello!". You’re setting GuiText to have the value of "Hello!", thus when you change the value of your GuiText variable, it changes what’s stored in the variable itself. It’s not actually being used as a reference to script.Parent.Text…

So this should work instead:

wait(20)
script.Parent.Text = “W”
wait(0.5)
script.Parent.Text = “We”

Hope this helps!

Ok. I’ll try both of yours and see if it helps. Thanks!

Why didn’t I see that before? That was a major bonehead move.

1 Like