I've been scripting for a bit so my brain doesn't really understand the words anymore, if you know the feeling.
local Flag = script.Parent.Parent.Flag
enabled = true
function onClick(Character)
local Player = game.Players:GetPlayerFromCharacter(Character)
script.Parent.TeamColor.Value = Player.TeamColor
end
script.Parent.ClickDetector.MouseClick:connect(onClick)
Returns a "attempt to index local Player (a nil value)"
I'm pre-occupied so, even while looking at other base scripts from FM, I can't physically read them to tell what's wrong right now. Thanks in advanced.

9 comments
...Oh. My bad. I thought it returned the character. Thanks.
No problem :)
I've got one more question. Is this supposed to work? I don't think it's the proper way to compare colors. if script.Parent.TeamColor.Value == "Bright Red" then
If you are using a BrickColor3 value, then it should look like this: if script.Parent.TeamColor.Value == BrickColor3.new("Bright Red") then. If it is a string value, the way you have it is fine.
I'm using a BrickColor value, not a brickcolor3 value
That's what I meant
Doesn't seem to be working?
I fixed it. You were a tiny bit off - BrickColor.new("Bright red"), is correct, the 3 was unneeded, but I instantly realized that - we both forgot , "red" shouldn't be capitalized
Whoops yeah I just copy and pasted yours haha!