Sabrina Carpenter has obtained a restaining order against a man who attempted to break into her home several times.