More pointedly, decide what you want to learn:
-
if you want to learn how to write FPS controllers, do a proper tutorial (Brackeys or the like), don’t go frankenstein-pasting code and trying to get it working. It will be nearly impossible for a beginner.
-
if you just want a good functioning FPS controller so you can go have tons of creative fun making and designing cool levels to run around in, use an FPS controller that’s already out there.
Here is a fairly full-featured super-basic starter prototype FPS based on Character Controller (BasicFPCC):
https://discussions.unity.com/t/855344
That one has run, walk, jump, slide, crouch… it’s crazy-nutty!!