My character sprite starts floating when im moving him around can someone find out why?

New Game - Flowlab Game Creator

1 Like

Welcome! And in your movement script i believe its the way you use the switch. or if you have something makes make him fall then that may be the problem. Your code is a little hard to read but I believe it to be one of these reasons

thank you! I’ll try that and do you have tips for organizing code?

1 Like

earlier i looked at the code and noticed that the space bar i use for jumping was on repeating so i turned it off but now if i press the space really fast it turns the switch on and off causing the glitch

1 Like

use a collison with the output conecting to the on input of the switch and disconnecting the spacebar from it. this way it will only allow jumping after hitting the ground. and when organizing your code. using bundles and the input & output behaviors for them helps as it splits up the code making it easier to understand and space out behaviors a little bit. this helps even more

if you go into the game and just jump you will start floating and moving to the right as if there were a push motor

i made a separate game with the same code for the character and found that there nothing in his code that is causing the bug

im going to be honest i dont see anything either. im not sure what to do. im very sry

Could you explain the bug in more detail, I’m not really seeing it in your game.

@Death68093 helped fix the bug in post 4 thank you!

2 Likes