It might be that the problem is not in this loop, but in the code that sets or replicates the name.
Typically, the name of a player lives in the PlayerState, and you’d loop over all playerstates to find the players.
Separately, if you have some relationship where you want “display of thing X” to change when “thing X” changes, the typical use is to mark the property as RepNotify and use the OnRep
notification to update the display. If the name is already a property on a character, all you need to do is implement this inside the character, and each character will sync itself, no need to loop.