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?

4 comments
Oh okay I will try that. I thought I remembered seeing something like that I just needed to find out the specfics.
Cool. It has worked for me in similar situations. Tell me if you need other help
Alright that worked great, the button works now, now for the capture process. I probably will need a lot of help but I will post them in separate questions.
Haha that's fun part right glad to help. If you want you can accept the answer(Translation: we both get better rep if you do. :))