Solution: So first of all, thanks to fredfishy for trying to help me out, but I didn't use their solution. I used another method and tried it and it worked. (basically used int values and did a loop of the time until the int values was changed, which was when all the players on the playing team died, which is kinda weird but it was easier for me to understand)
I'm making this one game where basically you survive until the round ends or when all the players die.
(also there's two teams: Playing and Out, I already made it that the players change teams when the game stops/starts)
I only scripted when the round ended, the game ends.
The part where I'm confused, however, is how to end the game when all players on the "Playing" team die and to stop the timer and game when that happens?
(the clocktimethingy is an int value that corresponds to the timer in the game)
local function startGame() status.Value = "Intermission" clocktimethingy.Value = 20 wait(20) if clocktimethingy.Value ~= 0 then clocktimethingy.Value = 0 end status.Value = "Game is starting!" pickRoom() --don't worry about this function, just picks the room wait(1) status.Value = "Game currently in progess..." teleportPlayers() --again, don't worry about this wait(1) clocktimethingy.Value = 45 wait(45) if clocktimethingy.Value ~= 0 then clocktimethingy.Value = 0 end unloadRoom() --unloads the room, basically clears a folder with the map in it, ultimately where the game ends end --below is how the game starts while true do startGame() end