Check if the folder is empty?
Hello fellow users, today I tried to make a folder check for my round system, everything works fine but I wan't to do when every player dies the game endes, and I tried those scripts:
1 | local rep = game:GetService( "ReplicatedStorage" ) |
2 | local playerInGames = rep.PlayersInGame |
3 | local matchRunning = rep.Variables:WaitForChild( "matchRunning" ) |
5 | if playerInGames < 1 and matchRunning.Value = = true then |
6 | print "game ended, all players died." |
I tried this also:
The first try gave the error: "attempt to compare Instance and number "
Please help xD,
Have a nice day!