My character won't stop floating left and right

You are setting the velocity to 6 when the key is pressed. This means even after letting go, the player will keep its current velocity of 6. You need to make it such that when the key is let go (the up output), the velocity is set back to 0

(Also, your character is not set to movable. This means that it can not jump and friction will not be applied to it which would normally counteract the velocity)

2 Likes

image

3 Likes