another thing, i only walk on the walls while i'm holding down the jump key
Well, then that's why!
You'll have to change your code, so that it pushes you away from the wall when you're in the air just enough to allow you to fall.
2. y can't i jump every time i press space
y = why
i = I
This isn't a cellphone, so please type proper.