How does one use the Team Service to check to see if a certain number of players are on a team?
Asked by
6 years ago Edited 6 years ago
Like I know Team:GetPlayers() gets the list of players in a Team but if I wanted to make a Raid system for a group I need to be able to set the amount of players required per team. It doesn't seem that "if Team.Players.NumPlayers == Insert Value Here" works here. So, how would I go about doing this?
01 | local teamA = game:GetService( "Teams" ):WaitForChild( "Valkan" ) |
03 | local teamB = game:GetService( "Teams" ):WaitForChild( "Raiders" ) |
05 | game.Players.PlayerAdded:Connect( function (a) |
06 | if teamB:GetPlayers() > = teamA:GetPlayers() then |
07 | script.raid.Value = true |
08 | local m = Instance.new( "Message" ,workspace) |