Button greyed out multiplayer

Hey guys!
I got a lobby which has 6 player roles
You join the server and can choose different player roles
When you choose a player role, that one is grayed out for everyone.
Now my question is: how can I make them be greyed about based on amount of players?
This is because I want player role 1 and 2 to be the only ones you can select if you are only 2 players on the server!
Thanks for all the help in advance !