If you want to figure out how to make your characters do something, look at other characters by more experienced mod developers that do the same thing. Don't copy and paste their code (unless it's Open Assets, in which case you just have to give credit), but you can still look at what things they're doing and apply them to your own scripts. That's how I did it.