fyi: %02i or %02d (both are the same) specifies how many digits at minimum should the given number have.
string.format("%02i", 5) -- 05 notice how it added a 0, thats the main point of this
string.format("%02i", 28) -- 28
string.format("%02i", 199) -- 199
string.format("%06d", 1024) -- 001024
Yeah I believe we have a solution but Iām not sure if they are applying it correctly to their script. If we could have a look at the current script we could easily make the changes necessary.
I did some variables for minutes and seconds like you said and changed ā⦠i ā¦ā to āminutes : secondsā but it would give me an error saying: ServerScriptService.Round:30: attempt to index number with āsecondsā
local roundlength = 300
local intermissionlength = 0
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local Camera = workspace.CurrentCamera
minutes = 5 * 60
seconds = minutes % 60
local function Teleport(Location)
if not workspace.Spawns:FindFirstChild(Location) then return end
for _, player in pairs(game.Players:GetPlayers()) do
local char = player.Character or player.CharacterAdded:wait()
char.HumanoidRootPart.CFrame = workspace.Spawns[Location].CFrame
end
end
InRound.Changed:Connect(function()
if InRound.Value == false then
Teleport("LobbyTP")
end
end)
local function roundTimer(Time)
while wait() do
local minutes = math.floor(Time / 60)
local seconds = math.floor(Time % 60)
for i = intermissionlength, 0, -1 do
InRound.Value = false
wait(1)
Status.Value = "TIME: "minutes : seconds""
end
for i = roundlength, 0, -1 do
InRound.Value = true
wait(1)
Status.Value = "TIME: "minutes : seconds""
if i <= 0 then
Ended()
end
end
end
end
spawn(roundTimer)
function Ended()
for _, player in pairs(game.Players:GetPlayers()) do
pcall(function()
player.PlayerGui.EndGui.CameraHandler.Disabled = false
task.delay(5,function()
player.PlayerGui.EndGui.CameraHandler.Disabled = true
end)
end)
end
game.Workspace.Enemies:ClearAllChildren()
game.Workspace.Pickups:ClearAllChildren()
end