Pass class from UI to Character

I tried the game mode idea however when i try to get the value it doesn’t work, it seems that it isnt setting the value or something as the array is empty when i try to access it from the character