Stopping a timer when the player hit a collider

I am making a roll-a-ball based game but I’m having trouble with my countdown timer. What I want to do is when the player hits a trigger at the end, the timer stops, leaving the time left at the time you reach the trigger. But I can’t figure out how to get it to work. I can’t get the timer to stop when I hit the trigger. Here is the script I made for the timer. Line 25 is where I want to put the code to stop the timer. How can I do it?96651-first-half.png

96652-second-half.png

perhaps what you are looking for is OnTriggerEnter()?
Here is the docs link