Im new to coding so i dont know what ive done wrong i'd really appreciate it if someone could help me out VVVVVV
Status.Value = "Get Ready To Play"
wait(2)
for i = Gamelength,0,-1 do
for x, player in pairs(plrs) do
character = player.Character
if not character then
-- left the game
table.remove(plrs,x)
else
end
if character:FindFirstChild("GameTag")
then
-- They are still alive
print(player.Name.." is still in the game!")
else
-- they ded
table.remove(plrs,x)
end
end
end
else
table.remove(plrs,x)
print(player.Name.." has been removed!")
end
Status.Value = "There are "..i.." seconds remaining, and "..#plrs.." players left"
if #plrs == 1 then
-- last person alive
Status.Value = "The winner is "..plrs(1).Name
plrs[1].leaderstats.Gold.Value = plrs[1].leaderstats.Gold.Value + reward
break
elseif #plrs == 0 then
Status.Value = "Nobody won!"
break
elseif i == 0 then
Status.Value ="Time up"

7 comments
Which line?
Make sure to properly indent your code
Its line 21 the else has a red underline
You don't need else on line 15 and click backspace once on line 16 before the end because that is ending the if statement before
I pasted the script and i got a error at line 28, the problem is you got 2 else or you are missing an if statement
I'm sorry I tried writing an answer but i don't understand the script. I don't get what your trying to do with all the if statements and else. Maybe on line 15 you're looking for elseif statement and if you are then you can remove the end on line 16
On line 28 i don't think you need the else statement, they only come with if statements and you haven't got an if statement for that else statement