The script is breaking too early. I think it's because it is only adding one person to the table then stopping without adding others (or seeing if others can be added).
///ACTIVEPLAYERS TABLE BEING MADE
while true do wait(5) ActivePlayers = {} for _, player in pairs(game.Players:GetPlayers()) do if player and player.Character then local humanoid = player.Character:WaitForChild("Humanoid") if humanoid and humanoid.Health > 0 then table.insert(ActivePlayers, player) end end end if #ActivePlayers > 1 then break else wait() end end
///PROBLEMATIC PART:
~~~~~~~~~~~~~~~~~
while MasterTime.Value > 0 do wait(5) MasterTime.Value = MasterTime.Value - 1
ReallyActivePlayers = {} for _, player in pairs(ActivePlayers) do if player then local character = player.Character if character then local MatchTag = character.Torso:FindFirstChild("MatchTag") local Humanoid = character:FindFirstChild("Humanoid") if MatchTag and Humanoid and Humanoid.Health > 0 then table.insert(ReallyActivePlayers, player) end end end end if #ReallyActivePlayers <= 1 or MasterTime <= 0 then break end
end
~~~~~~~~~~~~~~~~~