The man, named Junior Kabongo bombarded the actress with a number of emails where he told Hudgens that he would like to marry her, reported TMZ.
In one email, Kabongo claimed that he wrote screenplays and wanted to become a movie star. He then wrote to the 25-year-old star that he had booked a flight to LA.
Kabongo was then spotted driving up and down Hudgens' street.
The judge immediately granted Hudgens and her lawyer Shawn Holley won a restraining order.