Multiplayer Get Client ID & Random Players

Hi My Game Uses Socket.io (A Modified Version Of The Playcanvas Tutorial) And I Need A Way To Get A The Clients Id From The Server But Don’t Know How I Also Need A Way To Pick A Random Player From The Total. If Anyone Can Help I’m All Ears. Thanks!
-William Boersma

Here’s My Code If Needed
Client Side: https://playcanvas.com/editor/code/719734?tabs=55606661
Server Side: Glitch :・゚✧

I figured out how to get the clients id its simply Network.socket.id
I still need to choose a random player.

Should be easy to pick a random

can you give an example I have a variable called playernum on each player and a variable on the server called runner which is the random player num but it doesn’t work that code is server side if you want to take a look.

You would have to store a variable for each player, then call a random out of all those, and limit the amount of players allowed

@Gavin_Durbin can give an example on how I would do this.

let’s see

@Gavin_Durbin ?