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

Spawn TeamColor change script help?

Obviously this script needs something to call it, which is a voice command for me. I put it in kohls admin. Anyhow, I know it reads over this specific line of code, but it fails to change the spawns team color. Help?

for i, v in pairs(game.Teams:GetChildren()) do 
	for a, b in pairs(game.Workspace:GetChildren()) do 
		if v:FindFirstChild("away") then  -- The away teams team.
			if b.Name == "awayspawns" then
					b.TeamColor = BrickColor.new(v.TeamColor)
			end
		end
	end
end

1 comment

0

Errors?

1 answer

TeamColor is already a BrickColor value. Remove BrickCOlor.new(), and it'll work flawlessly.

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