You don’t figure it out. It’s meant to be a formatting example. Nowhere in this code is there anything in regards to counting down, tbe expectation was that you filled that out yourself.
Start your game timer at a certain amount of seconds. If you don’t know what minute-to-second conversion is, take a number for minutes and multiply it by 60 to get a representation of minutes in seconds (6*60 - 360 seconds). Count this number down and store it in an IntValue. He the client to connect to it’s Changed event and then apply my formatting code. Use the string you get at the timeString variable and set it as the text of the TextLabel.
-- Server (Script, ServerScriptService)
local gameTime = 6*60
local tracker = Instance.new("IntValue")
tracker.Name = "GameTime"
tracker.Parent = game:GetService ("ReplicatedStorage")
-- Artificial initial buffer
while gameTime > 0 do
gameTime = gameTime - 1
tracker.Value = gameTime
--[[ With a for loop instead of a while loop
for i = gameTime, 0, -1 do
tracker.Value = i
-- Client (LocalScript, StarterPlayerScripts)
local tracker = game:GetService("ReplicatedStorage"):WaitForChild("GameTime")
local minutes, seconds = math.floor(newTime/60), newTime%60
local timeString = string.format("%d:%.2d", minutes, seconds)
-- Up to you to figure this out
(TextLabelPathHere).Text = timeString
I should not really have had to provide that for for you, as all the posts here have explained how to do this several times over. If you aren’t familiar with programming or don’t understand, please ask questions about the post rather than trying to ask for the code to make this work.
You should also put some (or more) time into learning how to code so these small issues can be resolved by yourself. Searching before posting is also important; there are many helpful finds on the DevForum, Developer Hub and the Toolbox.
This is as far as I’m willing to handhold, with the code above. Anything further, please refer to my posts as I have explained this process at least three times now. I won’t a fourth time.