Instance.new not creating Teams?
For some reason when I try and create a team it doesnt create it. I cant tell if its not parenting or just not creating it at all. Can anyone help?
01 | local plrs = game.Players:GetChildren() |
05 | local plrsOnEachTeam = math.floor(#plrs / 2 ) |
08 | for i = 1 , plrsOnEachTeam, 1 do |
09 | local Team = game:GetService( "Teams" ) |
10 | local RedTeam = Instance.new( "Team" ) |
12 | RedTeam.TeamColor = BrickColor.new( "Really red" ) |
14 | local Folder = Instance.new( "Folder" , RedTeam) |
15 | Folder.Name = "leaderstats" |
16 | local Hits = Instance.new( "IntValue" ,Folder) |
18 | table.insert(redTeam,#redTeam + 1 ,plrs [ 1 ] ) |
22 | for i = 1 ,plrsOnEachTeam, 1 do |
23 | local BlueTeam = Instance.new( "Team" ) |
24 | BlueTeam.Parent = Team |
25 | BlueTeam.TeamColor = BrickColor.new( "Navy blue" ) |
26 | BlueTeam.Name = "Blue" |
27 | local Folder = Instance.new( "Folder" , BlueTeam) |
28 | Folder.Name = "leaderstats" |
29 | local Hits = Instance.new( "IntValue" ,Folder) |
31 | table.insert(blueTeam,#blueTeam + 1 ,plrs [ 1 ] ) |
35 | table.insert(redTeam,#redTeam + 1 ,plrs [ 1 ] ) |