Help With Debugging [Solved]
Frindow on 18 Jun, 2020 16:29 in Questions
I am trying to make it so when there are 2 people left in a match the game will end. But, I ran into an issue. When there are no players on the team it runs the script. It does not have anything to do with the else.Code: [Select]while true do wait() t = game:GetService("Teams"):GetChildren() for i,v in ipairs(t) do if v.Name ~= "Playing" then local playerAmount = v:GetPlayers() for playersAmount,_ in ipairs(playerAmount) do if playerAmount == 2 then else game.StarterGui.GameGUI.Status.Text = "Game Over!" game.Workspace.Plate.BrickColor = BrickColor.new("Really red")game.Workspace.Plate.Transparency = 0.1wait(0.1)game.Workspace.Plate.Transparency = 0.2wait(0.1)game.Workspace.Plate.Transparency = 0.3wait(0.1)game.Workspace.Plate.Transparency = 0.4wait(0.1)game.Workspace.Plate.Transparency = 0.5wait(0.1)game.Workspace.Plate.Transparency = 0.6wait(0.1)game.Workspace.Plate.Transparency = 0.7wait(0.1)game.Workspace.Plate.Transparency = 0.8wait(0.1)game.Workspace.Plate.Transparency = 0.9wait(0.1)game.Workspace.Plate.Transparency = 1game.Workspace.Plate.CanCollide = falsescript.Disabled = true endendendendendPlease help!