Unity 2d won't freeze position

I’ve been working on learning unity 2d for the past few days and just started working on my first project. I have a player standing on top of the ground, but gravity is affecting the player thus pushing the ground down. I want gravity to affect my player, but I don’t want it to pull the ground down. There’s no freezeposition for 2d rigidbody, so I tried using a sliderjoint2d, but that doesn’t seem to help at all.

You don’t need a rigidbody on objects that you want stationary, like ground or walls. All you need is a collider on them. Your player will collide with any 2D colliders as long as the Player itself has a rigidbody, everything else doesn’t need one, only if you want another object to move around dynamically, like a ball, or if you want another object to hit your player and impart physics forces on the player.

Though if you need a rigidbody for some reason, the answer to your question is then to check “Is Kinematic”. This will make it so the object can only be moved through translate or animation, not physics. (but just remove the rigidbody, as it sounds like what you want in this situation.)