menu
Roblox Forum Archive
Home
User Search
Forums
Donate
search
settings
Home
User Search
Forums
Donate
launch
Go to User Dashboard
Forums
Scripters
Test for 2 or more players on a team
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right
Test for 2 or more players on a team
Slendeath
Join Date: 2016-01-07
Post Count: 2
#227638038
Friday, November 17, 2017 5:10 PM GMT
Im wondering how to make a script that tests for 2 or more players on a team, and if there is then do something? i would be grateful if someone could tell me. thanks
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
WillieTehWierdo200
Join Date: 2008-08-13
Post Count: 1147
#227638188
Friday, November 17, 2017 5:17 PM GMT
local myTeam = game:GetService("Teams").MyTeam if #myTeam:GetPlayers() < 2 then print("Team "..myTeam.Name.." has less than 2 players in it") end
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
Cyrakohl
Join Date: 2014-11-09
Post Count: 3197
#227638210
Friday, November 17, 2017 5:18 PM GMT
local TeamS = game:GetService("Teams") local Team = TeamS.RedTeam local PlayerCount = #Team:GetPlayers() if PlayerCount >= 2 then -- stuff end
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
Slendeath
Join Date: 2016-01-07
Post Count: 2
#227643176
Friday, November 17, 2017 8:40 PM GMT
i'm not sure if the local script goes in to the Teams folder or the Starter Player folder and if it needs "while true do" at the begining
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right