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.
******ANSWER******
I figured it out myself, it was a simple fix, I accidentally said ==
instead of ~=
.
Thanks for helping anyways!