I'm not that great at scripting, using someone else's script for my game, the game is basically a obby racing game, where you gotta complete the obby in a certain amount of time to win, but if the timer hits 0 then everyone lose and including failing the obby, the bit for the timer and win/fail part of the script isn't working well, the intermission and loading up the map works fine, I know where it's not working, but idk how to fix it myself
t=360
repeat
t = t-1
s.Value = t.." seconds left"
wait (1)
local ingame = workspace.Ingame:GetChildren()
until t ==0 or vals.Winner.Value ~= "" or #ingame == 0
if vals.Winner.Value ~= "" then
s.Value = vals.Winner.Value.. " has won!"
game.Players[vals.Winner.Value].leaderstats.Points.Value =game.Players[vals.Winner.Value].leaderstats.Coins.Value +5
game.Players[vals.Winner.Value].leaderstats.Wins.Value = game.Players[vals.Winner.Value].leaderstats.Wins.Value +1
vals.Winner.Value = ""
else
s.Value = "No one has won!"
end