How do you change player pawn at run time when your inputs are in player controller?

Thanks but the problem is that a lot of my code is in the player controller, not just inputs. Will that work too?