How to know when a widget component is valid

You need to connect your replicated PlayerName variable to the SetName function, not the structure.