game.Players.TeamColor = "Bright blue";
This dosent work. i have an event before it to pick a teams, but I need it then to make it check to see if the Players is on red, then puts their teamcolor to red.
players = game.Players:GetChildren() randomp = players[math.random(#players)] print(randomp.Name .. " is killer") game.Player.TeamColor = BrickColor.new("Bright red") for i,v in pairs(players) do if v.Name ~= randomp.Name then print(v.Name .. " is runner") game.Player.TeamColor = BrickColor.new("Bright blue") end end
Player is never defined, replace Player in line 4
game:GetService("Players"):FindFirstChild(randomp).TeamColor = BrickColor.new("Bright red")
This looks through the Players and finds the player under the variable randomp then changes their teamcolor
and on line 8 replace what you have with
v.TeamColor = BrickColor.new("Bright blue")
as v represents each member of the table, and the table consists of all the players.