So basically, I want to change the height of my character over time instead of “snapping” to the set height. I know you need to use a “Lerp” function, but I don’t know how to do it (excuse my incompetence if the answer is simple, this is my 6th day learning how to program)

Have a look at this. It’s tricky in the beginning:

Mathf.Lerp(m_OriginalHeight, m_CrouchHeight, t)

t is a range between 0 and 1 - so 0 would equal the value m_OriginalHeight, and 1 would equal the value of m_CrouchHeight;. Lerp interpolates the value between your two variables, so 0.5 would be m_OriginalHeight + m_CrouchHeight / 2.

If you experiment with ‘t’ and mess with it in the inspector, you can see the height change in game. You can control it easily and gradually multiplying ‘t’ by Time.time.

I’m sorry to bother you, but I have no idea how to rewrite my code like that, (I’ve been learning for less than a week now), would it be possible for you to write me this script?

You could put the lerp routine in it’s seperate function, but this should work.
raiseHeight and lowerHeight are always 0, until the each relevant condition is true, then they equal Time.deltaTime. ‘speed’ slows it down by dividing the result.
The quirky thing is using time as the modifier and how it works.