The player gets inside the platform when bouncing off an enemy

Hello! I made my player bounce off an enemy when colliding with him. I used the twin behavior. When bouncing off an enemy, the player gets inside the platform if it is behind. How to make sure that the player does not break through the platform when bouncing?

Hello, lemedia!

I think you need an event that makes the twin movement ends when your player collides with that platform.

The player can bounce off the enemy in different places of the game and face many different types of platforms.