button = script.Parent IsRaid = game.Workspace.IsRaid function capture(plr) IsRaid.Value = true if plr.TeamColor == "Bright blue" then button.BrickColor = BrickColor.new("Bright blue") elseif plr.TeamColor == "Bright red" then button.BrickColor = BrickColor.new("Bright red") end end script.Parent.ClickDetector.MouseClick:connect(capture)
I am using this script as a raid terminal and I want this brick to change color and match the teamcolor of the player who clicked it. I was told that if you put something in the parentheses, it is a name for the player who clicked in this situation.
Do I have to word it a different way or change the way I write it?
You have to do:
if plr.TeamColor == BrickColor.new("Bright blue") then
That way it will know what "Bright blue" is.
Hope this helped.