This has been asked before I know but I have never been able to make it work Ive spent hours working on this and no luck this is my code… sorry if it looks like spaghetti. Also Thanks.
I would recommend using a rigidbody instead of a character controller. Here is a great tutorial on how to do that - YouTube