01 | local function splitplayers() |
02 | game.Teams.Lobby:Destroy() |
03 | local UseSeccondTeam = false |
04 | for i, v in ipairs (_Players:GetChildren()) do |
05 | if UseSecondTeam then |
06 | v.TeamColor = |
07 | _Teams [ "Cops" ] .TeamColor |
08 | else |
09 | v.TeamColor = |
10 | _Teams [ "Robbers" ] .TeamColor |
11 | end |
12 | UseSecondTeam = not UseSecondTeam |
13 | end |
14 | end |
There is a blue underline under if** UseSecondTeam** then and it says UseSecondTeam is only used in the enclosing function consider changing it to local
On Line 3 you wrote "UseSeccondTeam" with two Cs instead of "UseSecondTeam" with one C. If you fix that the blue underline will not execute.