Hovering text above enemies 2D

Context: 2D Sidescroller with some story elements

I am trying to make “floating/hovering” text boxes above enemies so players don’t have to look at dialogue boxes whenever I am trying to include some context to the game story. I am not sure what the exact terminology is for this is and I have been having a difficult time looking for something that is relevant enough to what I’m going for.

An example of what I am trying to achieve is here in the Corgi Engine asset: 81474-screen-shot-2016-11-03-at-113433-am.png

Here’s part of a script I used to make a healthbar float over objects. The script itself went on a prefab of a healthbar, which would be spawned and attached to every single game object that had health, something like this:

hp = Instantiate(hpPrefab);
hp.parentObject = gameObject;

public float xDisp;  //x offset from center of parent
public float yDisp; 
public GameObject parentObject;  //Reference to attached object

void Update()
{
		Vector3 wantedPos = Camera.main.WorldToViewportPoint(parentObject.transform.position);
		transform.position = new Vector3(wantedPos.x*Screen.width + xDisp,wantedPos.y*Screen.height + yDisp,40);
}