Output: "An error occured". Anyone know the problem?
Anyone know why this might be bugging out?
01 | oldcolor = BrickColor.new( "Toothpaste" ); |
02 | newcolor = BrickColor.new( "Toothpaste" ); |
05 | game.Players.PlayerAdded:connect( function (plr) |
06 | plr.Changed:connect( function (prop) |
08 | if (plr [ prop ] = = plr.TeamColor) then |
19 | if (checkIfOn(oldcolor) = = false ) then |
21 | local team = getTeamWithTeamColor(oldcolor); |
22 | team.Parent = game.Lighting; |
30 | checkIfOn = function (team) |
31 | local plrs = game.Players:GetChildren(); |
33 | if (plrs [ i ] .TeamColor = = team) then |
40 | getTeamWithTeamColor = function (color) |
41 | local teams = game.Teams:GetChildren(); |
43 | if (teams [ i ] .TeamColor = = color) then |