Theres gotta be a way to make it less complicated.
Also I cant figure out how to make the timer reset after the time runs out.
local seconds = 0
local minutes = 5
script.Parent.Text = tostring(seconds)
script.Parent.Minutes.Text = tostring(minutes)
while seconds <= 60 do
script.Parent.Text = tostring(seconds)
seconds = seconds - 1
wait(1)
if seconds == -1 then
print('1 MINUTE PASSED')
if minutes > 0 then
minutes = minutes - 1
seconds = seconds + 60
end
script.Parent.Minutes.Text = tostring(minutes)
end
if seconds == -1 and minutes == 0 then
seconds = seconds + 63 -- Abitrary number to stop the loop
script.Parent.Visible = false
script.Parent.Minutes.Visible = false
script.Parent.Parent.TIMESUP.Visible = true
end
end

1 comment
http://wiki.roblox.com/index.php?title=Loops#For