How to make polygons change color when pressed

I don’t know why it doesn’t work. I put the same codes as in the demo… :frowning: