Lerp Help???? Just classification

Hi so basically i know how lerps work and stuff but can u do this to use it as a varible??

Example 1:

transform.position = Vector3(Mathf.Lerp(minimum, maximum, Time.time), 0, 0);

can you do this :

var hello = transform.position = Vector3(Mathf.Lerp(minimum, maximum, Time.time), 0, 0);

or would u have to make transform.poisiton a variable?

You would need to do it like this

var thisPos = Vector3(Mathf.Lerp(minimum, maximum, Time.time), 0, 0);
transform.position = thisPos;

The code in Example 1 is fine. You don’t need to declare it as a variable separately. The second example is fine too.

–Eric

thanks for the help