I am trying to make a battle game with two teams. One is red team and other is blue team. I want that when both teams have equal players, a bool value will be changed. This is the script I have made up till now. It doesn't work and also doesn't show any error in the output.
What is the problem in the script? I have tried a lot but cannot make it work:
local bluechildren = game.Teams.Blue:GetChildren()
local redchildren = game.Teams.Red:GetChildren()
local round = game.ReplicatedStorage.RoundInProgress.RoundInProgress
game.Teams.Red.PlayerAdded:Connect(function()
if redchildren == bluechildren then
if round.Value == false then
round.Value = true
end
end
end)
Thanks!

1 comment
GetPlayers, notGetChildrenforgame.Teams. Also, you need to do#redChildren == #blueChildrenor you're comparing the values in the list for equality rather than just the number of values in the list.