What could help is to make the question less broad and break it up into pieces.
Perhaps start your project and let Sonic walk. If that works, make it jump. Run?
Then when you come across a specific detailed problem, it might be easier to ask and receive an answer.
I hope that helps you.
I see what you're saying, so I'll just explain my problem more detailed in away.
My problem is that I am trying to recreate Sonic's physics while going up loops, hills, slopes, etc. So, if he runs up a slope and he has enough speed he can get to the top of it. If he doesn't, he would accelerate backward the same amount. Sorry if I am not specifying.