Uh, it's all based on how you answer the questions. There's no "luck" about it. If you didn't get the one you wanted, restart. It took me about an hour to pull up the right questions to become Treecko.
Here are the personalities you should strive for in order to become a certain Pokemon:
Bulbasaur: Docile (Male), Calm (Female)
Charmander: Hardy (Male), Brave (Female)
Squirtle: Jolly (Male), Relaxed (Female)
Pikachu: Impish (Male), Hardy (Female)
Psyduck: Relaxed (Male), Lonely (Female)
Cubone: Lonely (Male), Impish (Female)
Totodile: Naive (Male), Jolly (Female)
Treecko: Sassy (Male), Quirky (Female)
Torchic: Hasty (Male), Sassy (Female)
Mudkip: Calm (Male), Timid (Female)
Some Pokemon are gender specific and cannot be obtained unless you set it to that specific gender.
Machop: Brave (Male Only)
Meowth: Quirky (Male Only)
Cyndaquil: Timid (Male Only)
Eevee: Naive (Female Only)
Chikorita: Docile (Female Only)
Skitty: Hasty (Female Only)
You have to answer the questions as you would with these kind of personalities. Say, the question about the alien invasion pops up. If you use answer as a brave person, saying you'd fight them and would not join them to rule the world, you'd be labeled as a Brave personality. Depending on your gender, you'd either be Machop or Charmander.