How do I lock my Character body 2d's position

Godot Version

4.3

Question

I want to make a dash that locks your y position and dashes you forward but I cant figure out how to lock the y position can someone help?

You could set the position to a fixed y value when ever necessary, you may need to paste some code for more specific advice.

yeah I have that y value but how to a set it to that

You can assign the y value of a Vector2 with dot notation

position.y = ???

If you don’t paste any code I can’t be more specific than that.

its for my friend so I dont have the code