working on a round script and its not saying I’m the winner after 1 round it breaks idk how to fix it here is the script
local round = require(script.Round)
local info = game.ReplicatedStorage:WaitForChild("Info")
local Message = info:WaitForChild("Message").Value
local Inround = info:WaitForChild("InRound").Value
local maps = game.Workspace:WaitForChild("Maps"):GetChildren()
local lobby = workspace.Lobby
local playersinRound = {}
repeat
local map = maps[math.random(1, #maps)]
print(map)
for intermission = 5,0,-1 do
print("Game Starting In ", intermission)
if intermission == 0 then
round.SpawnPlayers(map)
end
for i, player in ipairs(game.Teams.Playing:GetPlayers()) do
table.insert(playersinRound, player.Name)
if #playersinRound >= 2 then
return
elseif #playersinRound == 1 then
local playerwhowon = playersinRound[1]
print(playerwhowon, "Is The Winner!!")
wait()
round.ReturnPlayers(lobby)
end
end
task.wait(1)
end
if #playersinRound == 1 then
else
for Round = 5,0,-1 do
print("Game Ending In ", Round)
if Round == 0 then
wait(1)
round.ReturnPlayers(lobby)
Message = "Nobody Won D:"
task.wait(1.5)
Message = "Game Ended!"
playersinRound = {}
end
task.wait(1)
end
end
until Message == "Idk"
here is what it does (CHECK THE OUTPUT)
help is appreciated