Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to detect empty teams?

Asked by 4 years ago

I'm trying to reset parts to default when a team is empty, but don't know how to detect empty teams. I couldn't find any topics on this anywhere, so I figured I'd ask.

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Simply do this:

local team = game.Teams.TeamName

if #team:GetPlayers() < 1 then
    --Do stuff
end
0
Couldn't find anything like this, thanks! coolp_xels 105 — 4y
Ad

Answer this question