So I just got into scripting and I was looking up how to change a bricks color when it's touched and I found 2 ways of doing that 1st script:
function onTouched() script.Parent.BrickColor = BrickColor.new("Bright red") end script.Parent.Touched:connect(onTouched)
2nd script:
script.Parent.Touched:connect(function(onTouched) script.Parent.BrickColor = BrickColor.new("Bright yellow") end)
I tested both of them and they both work the same, I was just wondering which one is easier to use.
