local RepStorage = game:GetService("ReplicatedStorage");
local TimerValues = RepStorage:WaitForChild("Timer");
local min = TimerValues:WaitForChild("Min");
local sec = TimerValues:WaitForChild("Sec");
local StateOfGame = game:GetService("ServerStorage"):WaitForChild("StateOfGame");
function start_timer(minutes, seconds)
min.Value = minutes;
sec.Value = seconds;
--For debugging
print(min.Value);
print(sec.Value);
while min.Value == 0 and sec.Value == 0 do
--blah blah blah
end
end
while (true) do
wait(5);
if StateOfGame.Value == "Intermission" then
start_timer(0, 30);
repeat
--print(tostring(min.Value).." and "..tostring(sec.Value));
wait();
until min.Value == 0 and sec.Value == 0;
StateOfGame.Value = "Start";
end
wait()
end
When debugging and going line-by-line, it doesn't go into the loop even though min.Value == 0 and sec.Value == 30, what am I doing wrong?
This is a server script inside of ServerScriptService
Ask for more information if you need it, and thanks in advance.

4 comments
What is subtracting the min.Value and sec.Value values?
Putting this in a seperate comment because its a different topic, but there is a far easier way to go about this. Look up Tick() on the wiki. it will remove the need for all of this code I'm pretty sure.
I subtract them in the while loop, but but does that matter
Which while loop is the one not running?