Randomize player then change the player's class

Hi, how can I pick a random player then change it’s class to a different one?
image
I’ve tried to do something like that but It won’t work

I can see that Player might be null so since it will return an optional you need to wrap it in a failure context, that is why you have the red squiggle. perhaps try

if(Player := AllPlayers[Index]):
DifferentClass.ChangeClass[Player]

Yes it works now, but also do you know how can I pick 3 random players and then give them a class (each player, different class) just like in murder mystery type of games? (With a mention of ignoring a player that has been already choosen to give him a class so he’s not in two classes)