I am trying to update text in a UI based off of a changing value in a part inside of workspace.
It works for usually about the first 10 but then says " Players.VolcanicsGFX.PlayerGui.SelectionScreen.DecisionScreen.C1Clock.TimeChange:7: attempt to index nil with ‘Text’"
I have printed the value and it gives me what I want to change the text to, but it doesn’t change the text.
This is a local script inside of a TextLabel in a GUI (This is the script the error is on)
local V = workspace.Point2.ScriptC1T.Intermission.Value
local T = script.Parent.Text
local LO = script.Parent.Parent.Chapter1LightsOut
while true do
task.wait(0.34)
print("AHHHHHH")
if workspace.Point2.ScriptC1T.Intermission.Value == ("Yes") and workspace.ValueStorer.C1Players.Value == 0 and workspace.Point2.ScriptC1T.SpectateMode.Value == ("No") then -- It was no but you have to change it to no in order to work (Check/Complete/DidAlready)
print(workspace.Point2.ScriptC1T.Intermission.IR.Value)
script.Parent.Text = workspace.Point2.ScriptC1T.Intermission.IR.Value
LO.C1Playing.Disabled = true
LO.CamReset.Disabled = true
LO.Spectate.Disabled = true
LO.WeaponGiver.Disabled = true
else
T = (" ")
end
end
This is a server sided script inside of a part that also holds the StringValue (This script changes the StringValue’s Value)
while true do
task.wait(1.4)
if workspace.ValueStorer.C1Players.Value == 0 then
script.Disabled = true
task.wait(0.001)
script.Parent.ScriptC1T.Intermission.Value = ("Yes")
script.Parent.ScriptC1T.SpectateMode.Value = ("No")
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 45")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 44")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 43")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 42")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 41")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 40")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 39")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 38")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 37")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 36")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 35")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 34")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 33")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 32")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 31")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 30")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 29")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 28")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 27")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 26")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 25")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 24")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 23")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 22")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 21")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 20")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 19")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 18")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 17")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 16")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 15")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 14")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 13")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 12")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 11")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 10")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 9")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 8")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 7")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 6")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 5")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 4")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 3")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 2")
task.wait(1)
script.Parent.ScriptC1T.Intermission.IR.Value = ("Intermission: 1")
task.wait(1)
script.Parent.ScriptC1T.Intermission.Value = ("No")
else
script.Parent.ScriptC1T.Intermission.Value = ("No")
end
end