Everything is working fine apart from when the player hits the side of the platform and pressed jump, so you don't make the jump and hit the side. Two things either happen. You teleport above on the platform. Or it teleports you behind the platform and you flying behind the platform then eventually dying or go back on to the platform. imgur.com/a/e4IYA
Happened ever since adding this, line 19. Which works great in not making my player fall off the left of the screen (other issue in forum post FIXED). But now this issue has came about.
Sorry really hard to explain without testing it and seeing the bug yourself