Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does it say this? How do i fix it?

Asked by 8 years ago
local function splitplayers()
game.Teams.Lobby:Destroy()
local UseSeccondTeam = false
for i, v in ipairs(_Players:GetChildren()) do
    if  UseSecondTeam then
        v.TeamColor = 
        _Teams["Cops"].TeamColor
    else
        v.TeamColor = 
        _Teams["Robbers"].TeamColor
    end
        UseSecondTeam = not UseSecondTeam
end
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

1
You misspelled UseSecondTeam on line 3. Also, please make your question title relevant to topic in the future instead of generic Help me or what am I doing wrong. M39a9am3R 3210 — 8y

1 answer

Log in to vote
1
Answered by
SirPaco 66
8 years ago

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.

Ad

Answer this question