(1)
Such an extension can not exist if you want $\widetilde{G}$ to be connected, because then $G=\widetilde{G}/Z$ for discrete $Z$ implies $Z\subset\pi_1G$.
To see this, take $z\in Z$, a basepoint $\tilde{x}_0\in\widetilde{G}$ and a curve connecting $\tilde{x}_0$ to $z\cdot\tilde{x}_0$. Its image is a loop in $G$, which is not 0-homotopic. Indeed, if it was, then by the homotopy lifting property, the curve in $\widetilde{G}$ would be homotopic to a point by a homotopy which fixes $Z\cdot \tilde{x}_0$ as a set. Because this set is discrete, it would have to be fixed pointwise. So you get a 0-homotopy of a curve that fixes both endpoints, which is absurd.
If $\widetilde{G}\not=G\times Z$, then at least some connected component of $\widetilde{G}$ is preserved by some nontrivial subgroup of $Z$ and you can apply the above argument to that component.
(2) If $Z$ is not discrete, then Lie group extensions correspond to Lie algebra extensions, which are classified by $H^2(\mathfrak{g},\mathfrak{z})$. The latter is zero for semisimple Lie algebras, by the second Whitehead Lemma.