Answering a question by Chatterji–Druţu–Haglund, we prove that, for every locally compact group
$G$
, there exists a critical constant
$p_G \in [0,\infty ]$
such that
$G$
admits a continuous affine isometric action on an
$L_p$
space (
$0< p<\infty$
) with unbounded orbits if and only if
$p \geq p_G$
. A similar result holds for the existence of proper continuous affine isometric actions on
$L_p$
spaces. Using a representation of cohomology by harmonic cocycles, we also show that such unbounded orbits cannot occur when the linear part comes from a measure-preserving action, or more generally a state-preserving action on a von Neumann algebra and
$p>2$
. We also prove the stability of this critical constant
$p_G$
under
$L_p$
measure equivalence, answering a question of Fisher.