If I attack with a pokemon tha confuses , the defending pokemon is confused before taking the damange?
for example tangroth from st
If I get 2 heads the defending pokemon is poisoned and confused before taking the 20 damange from the atack?
When attacking you resolve damage before applying other effects of an attack, so the damage is applied first, and then the defending Pokémon is potentially poisoned and/or confused (depending on the results of your coin flips).