Building a NON-GUI button

I am trying to create a button in the game. Let me make it clear this is not GUI button, but an object in the game. It is cylinder, in a cylinder. When the player steps on it, the inner part goes down a bit, something happens(the easy part), when the player steps off of it, it returns to its normal position. I tried attaching a spring joint but I received very strange behavior. I had setting a connected body both above and below the button, but it would work the way I wanted. I would drop just a regular block on it, the button would depress, but when I moved the block off the inner cylinder would just kinda float away at odd angles, and it would not stop. Am I using the spring joint wrong, or is the spring joint just wrong to use?

You might try messing around with the min/max distances for the spring joint? You might also want to make sure that the joint isn’t breaking under force/torque – I’m assuming that you never want this spring to break, so you should be able to set those tolerances extremely high.

If you can’t figure this out, I’ve usually seen people do this sort of thing through an animation (or simple position lerp). Bit less dynamic, but easier to control and test as a result. Not to say a spring joint can’t work, but you do have that option.