How do I adjust a lights intensity when i collect a pickup

Hey Guys, I have a spotlight in my scene and 20 pickups. i want to be able to decrease the light intensity everytime i collect a pick up but i cant find anything to help with this. can someone please help :slight_smile:

depends ur programming level, light is a gameobject. it has light intestity parameter.

Iv only just started to learn and its for my masters project. Iv looked at that but when I used it to affect the intensity I kept getting errors so is there something Iā€™m missing. Iā€™m not sure on what needs to be done. :s