How to Make a Timer in Minutes and Seconds in Roblox Studio || EASY

Аватар автора
Геймеры и Взрывы
This is how to make a timer using minutes and seconds in Roblox Studio. HERE IS THE CODE FOR THE LOCAL (CLIENT) TIMER SCRIPT: timerGui = script.Parent gameOverGui = timerGui.Parent:WaitForChild('GameOverGui') timerLabel = timerGui.TimerLabel rs = game.ReplicatedStorage timeLeft = rs.TimeLeft minutes = rs.Minutes seconds = rs.Seconds seconds.Changed:Connect(function() timerLabel.Text = (string.format("%02d: %02d", minutes.Value, seconds.Value)) if timeLeft.Value == 0 then timerGui.Enabled = false gameOverGui.Enabled = true end end) HERE IS THE CODE FOR THE TIMEHANDLER (SERVER) SCRIPT: rs = game.ReplicatedStorage timeLeft = rs.TimeLeft minutes = rs.Minutes seconds = rs.Seconds timeLeft.Value = 5 for i = timeLeft.Value, 0, -1 do timeLeft.Value = i minutes.Value = math.floor(timeLeft.Value / 60) seconds.Value = math.floor(timeLeft.Value % 60) wait(1) end

0/0


0/0

0/0

0/0