Ah, I forgot one thing, it would be good if immediately after a collision the player became invincible for 1 or 2 seconds, this would avoid having multiple collisions at the same time, this happens a lot especially in collisions with the ground