Need help designing a sinking platform that lets objects pass through from underneath

I have very little experience with Unity, but I’ve experimented with walking around a landscape with a first person character.

What I want to make would look a bit like this:

You’d be able to collide with these objects, so they could block your way, or you could stand on top of them, and if you were to step or jump off of the sinking platform, it would stop sinking. The platform would eventually reach the ground, and stop.

Thanks for any help or advice!

you can use a script that checks for the player in a collider the collider will be a second object, then if the player is detected then use the transform ( the example uses c#)

public gameobject platform;

       void Update {
               platform.transform.Translate(0, -1, 0);

basic moving script

then you add a collider to the script using a if statement so it only moves when its detected in the collider