Gui problem no error but still not working

Hi I had gui problems in my last post because I forgot to use a remote event and I rewrote the script and it’s not working. I can’t find out what the problem is and there’s no errors in the output. I’m trying to make a 2 players needed to start script. There’s two scripts, here’s the first one


local TimerDisplay = game:GetService("StarterGui").Timer.TimerDisplay

local Players = game:GetService("Players")

function update()

local plrCount = Players:GetPlayers()

if #plrCount >= 2 then --hashtag used to get the length of the table/string

-- not done yet

else

ChangeGui.OnClientEvent:Connect(function(gui, label, text)

TimerDisplay[gui][label].Text = text

end)

end

end

Players.PlayerAdded:Connect(update)

Players.PlayerRemoving:Connect(update) 

2nd script 

local ChangeGui = game.ReplicatedStorage:WaitForChild("ChangeGui")


wait(1)

ChangeGui:FireAllClients("Timer Display", "TextLabel", "2 players needed to start!")

the formatting that you gave us is a bit weird tbh

local Players = game:GetService("Players")
local player = Players.LocalPlayer
local player_gui = player:WaitForChild("PlayerGui")

local timer_display = player_gui:WaitForChild("Timer").TimerDisplay
local ChangeGui = game.ReplicatedStorage:WaitForChild("ChangeGui")

local function update()
    timer_display["Timer Display"].TextLabel.Text = "2 player needed to start!"
end

ChangeGui.OnClientEvent:Connect(update)

and for the second script

--second script

local ChangeGui = game.ReplicatedStorage:WaitForChild("ChangeGui")
repeat 
    ChangeGui:FireAllClients()
    task.wait(1)
until #game.Players:GetPlayers() < 2

some parts of the script i’m not sure about because i don’t know what the explorer is showing
eg.

TimerDisplay["Timer Display"].TextLabel.Text = "2 player needed to start!"

I tried it out and it didn’t work so I’m starting to think it’s something outside the script. Also I don’t know why it formatted the code like that

check for errors and tell me. Make sure that in the script you are locating the text right. You should also add some print statements to check if the functions are actually running

i also made a mistake in the script so imma edit that

I added a print to the update function and it didn’t print to the output. I tried it on the loop on the other script and that worked. I’m gonna try fixing it now but otherwise I don’t see the problem