Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Changing GUI Text?

Whenever I make a script that makes a GUI change it's text for example changing a message on a GUI, it doesn't appear until you reset, is there any way to avoid this?

-- script is in a GUI Text Label
while true do
wait(1)
script.Parent.Text = "Welcome to my game!"
wait(10)
script.Parent.Text = "Send me feedback"

It works but you have to reset for it to work, I do not want that.

5 comments

0

What doesn't appear? I take it this isn't the whole script, considering there isn't an end. Please post the whole script.

0

It looks perfectly fine? The only thing missing is an "end" at the end of the script, but I assume you know that? Idk what exactly the problem would be. If you don't have the "end" remember to add it in.

0

If this is located in a gui in the StarterGui object it should work fine. The only problem I could see is if this script is put into the gui later and you are only affecting the one in the StarterGui.

0

FearMeIAmLag, That's it! It is being edited in the StarterGui, not the PlayerGui. Can you tell me where to put the script so it is in the playergui?

0

Things in the StarterGui won't run -- but they get automatically copied into the PlayerGui each spawn (where they will). Since you're using script.Parent, the fact that it's the StarterGui shouldn't be a problem (and is correct).

1 answer

✓ Accepted answer
--I think it's because it was to fast?
while wait() do -- If this dosn't work try changing it to wait(1) or more.
wait(1)
script.Parent.Text = "Welcome to my game!"
wait(10)
script.Parent.Text = "Send me feedback"
end -- I'm pretty sure you need end for it to work

This discussion is preserved as it was. New answers, comments, and votes are closed.