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

Spawn TeamColor change script help?

Asked by 8 years ago

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
0
Errors? NinjoOnline 1146 — 8y

1 answer

Log in to vote
1
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
8 years ago

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

Ad

Answer this question