I have the same problem and tried to follow your instructions, but when I get into the game both player and target's unitframe disappear.

They come back when I delete the line. I am wondering...