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

Why is Textlabel.Text not changing?

local fluffing = game.Workspace.Sounds["Fluffing A Duck"]
local textSound = game.Workspace.Sounds["OneShot - Text"]
local Dialogue = game.StarterGui.Dialogue.TextLabel

fluffing:Play()

Dialogue.Text = "Dad: Alrighty son, it's time for bed."
wait(4)
textSound.Playing = true
Dialogue.Text = "Dad: No! You cannot watch another episode of Two Piece!"
wait(4)
textSound.Playing = true
Dialogue.Text = "Dad: No son, c'mon go take your medication and go to bed..."
wait(4)
textSound.Playing = true
Dialogue.Text = "Task: Take your medication."

The Textlabel's text wont change on screen as told to in script, everything else works and runs smoothly, anyone know why?

Thanks in advance!

1 comment

0

This might work but I am not sure because I haven't scripted text labels in a while. Change line 3 to: local Dialogue = game.Players.LocalPlayer.PlayerGui:FindFirstChild("Dialogue"):FindFirstChild("TextLabel")

1 answer

I am going to take a guess and say that you don't have the script in the Dialogue ScreenGui. When experimenting with this, I found that a simple way to change fix the text not changing is by parenting the script to the Dialogue ScreenGui and change line 3 to:

local Dialogue = script.Parent.TextLabel

or something like that.

There may be other methods to fix this, but this was the first one I came up with.

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