I'm trying to decrease the players speed when falling and hitting the ground.
I have a switch function where i switch from walking mode to flying for the player, but the problem is that when i'm flying very high and switch to walk mode i fall and hit the ground hard.

I know this should be an easy task for someone who is good at math but unfortunately i'm not.
Any suggestions on how i could achieve this?

I was thinking on using a linetrace pointing down at the ground and when i gets a trace it should slow my speed down.... am i in the right path or totally lost?!

Please help!