Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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 comment

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.

1 answer

✓ Accepted answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.