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"
They are a few things wrong with your code. The first thing is that you added to else statements on line 21 and line 15. Your only supposed to have one else or one elseif. Second you don't need an end on line 33. 3. You can only have a break only when you have a loop like a return loop