local minutes = 29
local seconds = 59
local function updateMinute()
	if seconds == 0 or seconds == "00"
	then
		minutes = minutes - 1 ; seconds = "00"
	end
end

local function updateGUI()
	for i, v in pairs(game.Players:GetChildren()) do
		v.PlayerGui.TimerGui.Gui.TextLabel.Text = game.StartGui.Gui.TextLabel.Text
	end
end

local function updateTime()
	game.StarterGui.TimerGui.Gui.TextLabel.Text = minutes..":"..seconds
end

local function startFunction()
	while true do
	wait(1)
	seconds = seconds - 1
	updateMinute()
	updateTime()
	updateGUI()
	if minutes == 0 then minutes = "00" end
	if seconds < 0 or seconds == "00" and minutes >= 1 then seconds = 59 end
	if seconds == "00" and minutes <= "00" then break end
	end
end

game.Players.PlayerAdded:Connect(function(player)
startFunction()
end)


When I try this script, the "UpdateGUI()" function doesn't operate, as if it doesn't exist, there is no error.

9 comments

0

I'm no expert (nor close to one), but while browsing your script I realized I had a similar one made. Try replacing "game.Players:GetChildren()" with "game:GetService'Players':GetPlayers''"

0

No his way of getting a list of players works just fine

0

Also, is this a server script?

0

So what is this script supposed to do

0

The server cannot access Client GUI's. You're supposed to use RemoteEvents.

0

This is a server script

0

That easy?

0

just use remotes?