So, I'm working on a game, where, if you lose. You basically change team. Last one to be in the Contestants team wins. However, I'm having issue on detecting the last person on the Contestant team and award them a win, and teaming them to "Fallen". I could make a script to count the number of players though. Here is what i tried:
local team = game:GetService("Teams").Contestants
local players = team:GetPlayers()
if #players <= 1 then
game.ServerStorage.WinDetector:Clone().Parent = game.Workspace
end
if #players == 0 then
SendMessage("Couldn't detect a winner.")
EndGame()
end

2 comments
That's not what i wanted. How can i detect the player instance that are in the contestant team and is the only player to be in the team?
You already did that, I just thought it didn't work for you because it only checks once