Not a valid member error persistent even when existing

So I am making a system that involves a round timer. This timer is constantly updated when a value has been changed. Everything seems to be working fine except the script which keeps saying the textlabel being updated is nil even though it exists:

image

I’m not sure why I keep getting this error because I’ve spelt it completely right and it does exist on my client. Why am I getting this error and how can I fix it?

Code
local RoundUI = MainUI.MainFrame.RoundUI

local RoundState = RoundUI.RoundState
local Timer = RoundUI.Timer
Timer.Visible = false

GameValues.RoundState.Changed:Connect(function()
	RoundState.Text = GameValues.RoundState.Value
end)

GameValues.RoundTime.Changed:Connect(function()
	local t = GameValues.RoundTime.Value
	Timer.RoundTime.Text = string.format("%02d:%02d", math.floor(t / 60), t % 60)
	Timer.Visible = GameValues.RoundState.Value == ("Intermission" or "Round in Progress") and true or false
end)

try using :WaitForChild() or returning if :FindFirstChild() returns nil.

I can only assume that the instance hasn’t finished streaming in by the time the code executes, causing an error.

After defining the ‘t’ variable, try printing something like print(Timer:GetChildren()) to see what is going on.

Peppering print() statements throughout code might help debug? LMK what happens.

I managed to fix this error by turning off “ResetOnSpawn” property in the guis. Thanks for the replies