I'm trying to figure out why it's true that if $g^p\in{}Z(G)$, then $g\in{}Z(G)$ where $p$ is prime and $G$ is a $p$-divisible nilpotent group. I'm currently stuck in the middle of the proof. I know that $G$ commutes with all $p$-elements of $G$ (since $G$ is nilpotent and $p$-divisible), therefore all $p$-elements are in the center.
The approach that I keep trying is to show that $g\in{}Z_2(G)$ because I've proven another result that says if $g\in{}Z_2(G)$ and $g^p\in{}Z(G)$, then $[g,G]$ is a central subgroup of finite exponent, which would allow me to conclude that $[g,G]=1$.
The trouble I'm having is showing that $[g,G]$ is a p-element. If I can show this, then that would mean it's in the center and so $g\in{}Z_2(G)$. I've tried looking at p-powers of $[g,h]$ for $h\in{}G$ and seeing if there are any manipulations that would allow me to bring in a pth power to get $[g^p,h]$, but I haven't made much progress.
I imagine it's a pretty easy step, but I haven't been able to see it yet. Thank you for any hints/help!