If there are on game 2 Players or more, Game Starts, If there is 1 player it prints that More players are needed, any help pls?

local players = game.Players:GetPlayers()
local PlayerCount = 0


game.Player.PlayerAdded:Connect(function()
PlayerCount = PlayerCount + 1
end)

game.PlayerRemoving:Connect(function()
PlayerCount = PlayerCount - 1
end)

If PlayerCount < 1 then do
print("We Need More Players")
else

--- Runs other script ....

3 comments

0

Unnecessary do-end block and the beginning of your if statement is capitalized. Pay attention to the output window.

0

Still, I corrected it doesn't work