why do you have the player.y>spikes.y ? which is saying is the player below the spikes (as y goes from top to bottom of screen )
If you only have the hitbox over the top section of the spikes is this needed ?
Or are you looking to have a "if character is only falling onto the spikes then damage character ?" (maybe with a character.angle is between 0 and 180 ?)
I've also tried < and =, but none of them work either.
does anybody know what to do?