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 9 years ago
01local function splitplayers()
02game.Teams.Lobby:Destroy()
03local UseSeccondTeam = false
04for 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
13end
14end

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 — 9y

1 answer

Log in to vote
1
Answered by
SirPaco 66
9 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