I'm new to Unity and C# in general, so excuse my terminology(or lack thereof)...

I have succeeded -with the help of a friend, to credit where its due- in making a platform go up a certain amount after one frame of collision with the player! The only problem is that, now, I can't seem to get it moving down again... Said friend challenged me to make it go up, stay airborne for a certain amount of time, then go back down.

Here is a snippet of my working code that makes it go up.

```
bool HaveCollided = false; //Collision checker boolean

void Update()
    {
        Vector3 up = lifter * Time.deltaTime;
        if (HaveCollided != true || transform.position.y >= 5)
        {
            return;
        }
    }
void OnCollisionEnter(Collision collision) //Makes HaveCollided true at collision event
    {
        if (collision.gameObject.GetComponent<Playertag>() != null) //don't use GetComponent in Update()
        {
            HaveCollided = true;
        }

```

So if my logic is right, I'd need to nest another if statement inside the one where the condition is: `HaveCollided != true || transform.position.y >= 5` which should be:

```
if (newTime == Time.deltaTime * CertainAmount && transform.position.y >= 1) //make platform go down until y position is equal to 1
        {
            //make platform go down
            Debug.Log("reached");
            transform.position = transform.position - up;
        }

```

But it's not working. It doesn't even seem to reach the part that would make the platform descend. I literally do not know where to go from here...