# Create a new Row for each connected Player

**URL:** <https://forums.unrealengine.com/t/create-a-new-row-for-each-connected-player/475475>\
**Category:** UI\
**Tags:** foreachloop, unreal-engine, UI, Widget, question, Blueprint\
**Created:** [December 5, 2020, 11:42pm UTC](https://forums.unrealengine.com/t/create-a-new-row-for-each-connected-player/475475 "2020-12-05T23:42:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_8bd91971](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8bd91971](https://forums.unrealengine.com/u/anonymous_user_8bd91971)\
**Post date:** [December 5, 2020, 11:42pm UTC](https://forums.unrealengine.com/t/create-a-new-row-for-each-connected-player/475475/1 "2020-12-05T23:42:58Z")

</div>

Hello, I’m trying to create a Scoreboard widget using a Grid Panel constructor, being Row 0 where the Placeholders will be, whilst on Row 1 it displays the stats for each player connected to server:

 ![324036-scoreboard-widget.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/c/3/3c3ad7b57a3db591602547a437652df9dd01c0ec.png)

And on widget BP construct, I get the values of each variable (in this case I’m only getting the PlayerName):

 ![324037-widget-construct.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/9/9c98fa41b10564ec00e13c20763dc0f2b5a5ad93.png)

Now I’m having trouble in creating a new row for each connected player, can someone help me in doing it? I guess I’ll need to use a **ForEach** but I can’t wrap my hand around on how to achieve this.

Thank you.

---

<div class="post-metadata">

**Author:** ![Aherys](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aherys/32/1194650_2.png) [@Aherys](https://forums.unrealengine.com/u/Aherys)\
**Post date:** [December 6, 2020, 9:21am UTC](https://forums.unrealengine.com/t/create-a-new-row-for-each-connected-player/475475/2 "2020-12-06T09:21:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8bd91971](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8bd91971](https://forums.unrealengine.com/u/anonymous_user_8bd91971)\
**Post date:** [December 7, 2020, 11:47pm UTC](https://forums.unrealengine.com/t/create-a-new-row-for-each-connected-player/475475/3 "2020-12-07T23:47:17Z")

</div>

Thanks for the heads up, I had to create a sub-widget to get all of the PlayerStats and now the ForEach is running as intended.
