I am trying to make this loop stop once all players in the server has a value as false. Would this work?...
for i = 120,1,-1 do Status.Value = i if game.Players:GetChildren().PlayerValues.Playing == false then break end wait(1) end
There are a couple of problems with your script. First off, GetChildren returns a table. If you try to use .PlayerValues on a table, the script will think "oh you're looking for an object named PlayerValues right in Players". Then the script will say, "nope nothing named PlayerValues here, I have an error".
So you want to make a function that will loop through all players in Players service to determine if there is a PlayerValues value still set to true.
In the new script I've made below we are establishing a function that we can use to return a true or false value, if there is anyone with a value of true or not. Within the function there is a for loop that will go through all Player instances in the Players service. With that loop it will go into each individual player and check if the value is true, if so return false to the if then statement. If the loop is to finish then that means that no one has a value of true and the script will return to the if then statement with true. This will cause your code in the if then statement to execute and break your numerical for loop.
function AllPlayersFalse() --Establishing function. for i,v in pairs(game.Players:GetPlayers()) do --Go through all players. if v.PlayerValues.Playing.Value == true then --Check if Playing value is true. return false --Since we're checking for falses, this has to return false as that means a person is still playing. end end return true --The for loop is done, no one is playing. end for i = 120,1,-1 do Status.Value = i if AllPlayersFalse() then --Have the function return true or false to complete the if then statement. break end wait(1) end