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

My Text on a TextLabel does not appear?

Hi. I have a problem.

I am trying to make a dialog for all players in the game. Now, I tried this script to test if it works, but it doesnt. Does somebody know why the text does not change?

LocalScript:

local event = game.ReplicatedStorage.Dialog1
wait(2)
local Dialog2 = game.Players.LocalPlayer.PlayerGui.Dialog.Frame.Text.Text

local function Dialog1(player)
print("Dialog starts")
Dialog2 = "A"
wait(0.1)
Dialog2 = "AB"
end

event.OnClientInvoke = Dialog1

(The LocalScript starts, the RemoteEvent is not the problem.)

1 answer

✓ Accepted answer

Make sure to accept this answer if it solved your problem.

Question

My Text on a TextLabel does not appear?

Answer

This is actually a common misconception I've accidentally made myself.

The problem here is that Dialog2 is not reference to the .Text property of your text box, Text but instead the value which .Text holds.

The solution is to define Dialog2 as reference to the text box its self and then set its .Text property.

Here is some unfinished code you should be able to piece together and fit to your own code:

local dialog2 = Dialog.Frame.Text

dialog2.Text = "A"
wait(.1)
dialog2.Text = "AB"

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