Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Print names of players in a team?

Hi, So how would I go about printing all players names in a team.

I.E. - Printing all the players names that are in the team 'TestTeam' Thanks,

1 answer

✓ Accepted answer

ROBLOX Provides an API method, GetPlayers, to get all the Players in a Team. From there, just loop and print:

local Team = game:GetService("Teams"):GetChildren()[1] --change this to whatever

for _, player in ipairs(Team:GetPlayers()) do
	print(player.Name)
end

This discussion is preserved as it was. New answers, comments, and votes are closed.