Lock X/Y axis on cube?

I asked a question similar to this many months ago…
I tried using the example given but it failed this time, so here I am!

I want a cube to fall, but NOT to be able to move around on the X or Y axis; using the constraint logic brick for each sends it somewhere far away (across the map, I think. It just disappears…)
Any ideas?

Under the physics tabs you can lock certain axis of rotation and translation (6 checkboxes, one for each axis of motion)

Yeah, I had already tried that… it does nothing
If it helps, the cube is dynamic, and the player is Character. So when I jump on it, it moves around.

The options in the physic panel for lock the translation and rotation only work with Rigid Body, why not set the player to rigid body and lock the rotation(I can be wrong, but looks like the dynamic physic type is basically the rigid body with the rotation locked), and the translation in X and Y edges(that you want), and if you are trying to do the player cannot slides on hills the way is deactivate the anistropic friction(or increase the friction in material panel).

Ah, sweet thanks!
The object is supposed to end on contact anyways… but I just remembered this’ll be perfect for another mechanic!

Thank you, Mr. Carlo!