Hello. i am having an issue with my matchmaking system. sometimes there is 1 player left but it wont start new game and declare the winner.
i have tried altering the script but it didnt work.
while task.wait(1) do
print(#script.PLAYER_FOLDER.Value.IN_BATTLE:GetChildren())
if #script.PLAYER_FOLDER.Value.IN_BATTLE:GetChildren() == 1 then
local People = script.PLAYER_FOLDER.Value.IN_BATTLE:GetChildren()
local Winner = People[1]
AnnounceWinner(Winner.Name.." WINS!")
NewGame()
elseif #script.PLAYER_FOLDER.Value.IN_BATTLE:GetChildren() == 0 then
NewGame()
else
end
end