0

# How do I fix my round ending script? The PLRS variable doesnt seem to work.

Hello! I'm Poggers and I own Sword Battles by Point Interactive and I have a script which is supposed to run when a player is the last remaining and then teleport him to the lobby and get back to the intermission script but instead it doesnt run.

    if plrs == 1 then
-- Last person Standing
Status.Value = "The winner is "..plrs[1].Name
break
elseif plrs == 0 then
Status.Value = "Nobody won!"
break
elseif i == 0 then
Status.Value = "Time up!"
break
end


This is the script ^ . and the plrs is

local plrs = {}

for i, player in pairs (game.Players:GetPlayers()) do
if player then
table.insert(plrs,player)
end
end