Have a look at the 'create text tag' actions in the trigger module of the editor. You can use another variable to store the name of the player (if necessary), then use the 'create text tag' action to create the text of the player's name and another trigger action to attach it to whatever unit you want it to be attached to.
I did something similar with a trigger with the event being game start during a loop that actually spawns the heroes for a player and it worked:
Text Tag - Create a text tag with the text (Text (Name of player (Picked player)) with color (Color((Current player (Picked player) color)))) for (All players), using a font size of 24, at ((Last created unit) attachment point ("Status Bar")) and height offset 1.0, initially Visible, and fog of war enforcement set to False
Text Tag - Attach (Last created text tag) to (Last created unit) with height offset 9.0
Unit - Store text tag (Last created text tag) for unit (Last created unit) at index (Owner of (Last created unit))
The first trigger doesn't actually attach it at the unit but it does create the text tag with the info. The second trigger attaches the text tag to the unit.