01 | wait() |
02 | local c = game.Players:children() |
03 |
04 | for d = 1 , #c do |
05 | local cc = c [ d ] |
06 |
07 | if cc.Character ~ = nil then |
08 | cc.CameraMode = ( "LockFirstPerson" ) |
09 |
10 | for i = timeTillGameEnds, 1 , - 1 do |
11 | h.Text = "Time left: " .. i |
12 | wait( 1 ) |
13 |
14 | end |
15 | end |
16 |
17 | end |
18 |
19 | h.Text = "Time's up" |
20 | wait( 3 ) |
This is a script for a minigame. When I test it, the time counts down from 20, and when it gets to 0 it repeats and starts counting down from 20 again. It never breaks out of the code to say "Time's up!"