Answer
$k=\pm3$
Work Step by Step
For the function $y=x^3+kx^2+3x-4$ to have only one horizontal tangent line, we need $y’=0$ to have a single solution. We have:
$y’=3x^2+2kx+3=3(x^2+\frac{2k}{3}x+1)=0$
and we need a perfect square for the variable (otherwise there will be two solutions). Thus we have:
$\frac{2k}{3}=\pm2$ and $k=\pm3$.