How can I randomly select players and move them around

Hi, I am developing a game that has 6 players, the game needs to randomly select a player and move them to a different position then move them back and repeat the process with the rest of the players excluding the players that have already been selected and moved, how do I write a script that can do this? I am really struggling with randomly picking a player through code.

Answers

  • Just one idea: Get a random number and use Player.GetNext() this many times. One player (e.g. the Master Client) does this and informs everyone else.