What does Team:GetPlayers() return if there are no players on that team? I thought it would return nil, but it didn't seem to.
Solved with BlueTaslem's answer.
the code I used:
if next(game.Teams["Blue"]:GetPlayers()) == nil then
What does Team:GetPlayers() return if there are no players on that team? I thought it would return nil, but it didn't seem to.
Solved with BlueTaslem's answer.
the code I used:
if next(game.Teams["Blue"]:GetPlayers()) == nil then
The Wiki says it returns a list, so it will return a list. The list will just be empty.
Not all nothings are equal. It would be very inconsistent to return nil when an empty list {} perfectly represents the concept of "a list containing nothing".
Ohhh, yeah. Thank you!
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
An empty array.
Okay, thank you.