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 3 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 3 years ago
Edited 3 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 — 3y
Ad

Answer this question