-
What do you want to achieve? Keep it simple and clear!
So i need to get how much people in team, because i need only 1 player in each team. -
What is the issue? Include screenshots / videos if possible!
No idea how to get amount of people in team -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tryed to like, getpeople or smth.
My code:
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")
local DPTeam = Teams.TeamDP
local RGTeam = Teams.TeamRG
local RRTeam = Teams.TeamRR
local DBTeam = Teams.TeamDB
local assigner = 0
Players.PlayerAdded:Connect(function(player)
assigner = math.random(1,4)
if assigner == 1 then
player.Team = RGTeam
end
if assigner == 2 then
player.Team = DBTeam
end
if assigner == 3 then
player.Team = DPTeam
end
if assigner == 4 then
player.Team = RRTeam
end
end)