Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why do TextLabel not refresh when you change the text?

Asked by
asgm 109
5 years ago
Edited 5 years ago

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

Log in to vote
0
Answered by
karlo_tr10 1233 Moderation Voter
5 years ago

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.

0
Thanks,I'll try this (sorry for late reply) asgm 109 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

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
Log in to vote
-1
Answered by
harstud 218 Moderation Voter
5 years ago

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

0
This is actually bad answer, you must read before you post. karlo_tr10 1233 — 5y

Answer this question