slowly decrease value when in trigger

Kinda vital. I’ve been looking at using Time.deltaTime and the like to decrease a value by a certain increment per second when I am in a trigger collider.
Any ideas?

well you can use a for loop to decrease the value.

example if (boolean from collision area)
for (int i = 0 i < someRandomCap; i++)
{ do something to decrease this value / 3 or 4 (to offset how many updates is called per cycle)

that should get you on your way to doing something.