passing through enemies after being hit

I have a box collider 2D that is set to a trigger and another one that is not, when Enemies hit me and the player becomes invincible for 3 seconds during this time I can exploit the game by pushing enemies around and off ledges, how can I make it during my 3 seconds of invincibility I am able to pass completely through the enemy?

Good day.

Best is disable rigidbody and colliders

GetComponent().enable=false;

But then you must control its position or it wil lbe able to cross everything.

Maybe good solution is to disable the component sin the enemis…

Good luck

found a simple fix for just changing the player layer to “Hurt Player” for those 3 seconds then changing it back to player once she can be hurt again @__@ don’t know why I didn’t think of this last night