Set default pawn class to change depending on selection

Is there a way to change the gamemodes default pawn class depending on what you select in a class selection menu? So then if you select a different character in the menu, when you load the map it will spawn the said character.

60746-1.png

This is what I am talking about

and this is my current setup which does not work. I am using a new game instance that is enabled in the project settings as the default so it cant be that.

did you figure it out?