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

Why do TextLabel not refresh when you change the text?

Oftentimes I do a script like this.

while true do
TextLabel.Text = "bro"
wait(3)
TextLabel.Text = "can u chill?"
wait(3)
TextLabel.Text = "u cant see this cuz the guis not updating hahah ha ha"
end

As the 5th line says, scripts like this doesn't update the GUI, unless you reset, which will make the GUI updates to the latest text. However, the TextLabel will stay with that said text until you reset again.

The question is, how do I make it so that the text updates everytime I do TextLabel.Text = "text" without having to reset?

3 answers

✓ Accepted answer

You must give us more details but I assume that you are changing gui in starter player, example: local TextLabel = game.StarterGui.Gui.TextLabel but you should use gui in player gui: local TextLabel = game.Players.LocalPlayer.PlayerGui.Gui.TextLabel And it also must be localscript.

1 comment

0

Thanks,I'll try this (sorry for late reply)

Bro you forgot to put wait() after the 6th line so the 6th line shows but then it changes instanly cause you forgot you put wait!

while true do
	TextLabel.Text = "bro"
	wait(3)
	TextLabel.Text = "can u chill?"
	wait(3)
	TextLabel.Text = "u cant see this cuz the guis not updating hahah ha ha"
	wait(3)
end

Do you have ResetOnSpawn enabled? If it is, which can be found in the ScreenGui's properties, turn it off.

1 comment

0

This is actually bad answer, you must read before you post.

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