So im making a game and i want each of the 2 teams to have a max limit
i tried doing < 5 so only 5 players can join the team but it doesnt seem to be working?
can you help me out?
game.Players.PlayerAdded:Connect(function(plr)
local Max_Hiders = Teams.Hider:GetPlayers()
local Max_Seekers = Teams.Seeker:GetPlayers()
if #Max_Hiders < 4 then
plr.Team = Teams.Hider
else
if #Max_Seekers < 1 then
plr.Team = Teams.Seeker
end
end
end)
game.Players.PlayerAdded:Connect(function(plr)
local Teams = game:GetService("Teams")
local Max_Hiders = Teams.Hider:GetPlayers()
local Max_Seekers = Teams.Seeker:GetPlayers()
if #Max_Hiders < 4 then
plr.Team = Teams.Hider
elseif #Max_Seekers < 1 then
plr.Team = Teams.Seeker
end
end)