Hello,
Yup, for each is the way.
You need to connect the ping exec from an entry point (Like, when you open the scoreboard).
For each Loop is well… a loop who iterate over all the element of an array.
So in your array is Player1, Player2, player3,
Loop body will go for player1, the player2, then player3.
When it reach the end, it go to completed.
You will get the name from Array element.