You need to use vec_to_screen, not vec_for_screen

while(1)
{
vec_set(temp,my.x);
temp.z += my.max_z + 10; // Above the entity
vec_to_screen(temp,camera);

my_txt.pos_x = temp.x;
my_txt.pos_y = temp.y;
wait(1);
}