I want to figure out how to make this gameobject follow another game object on the x axis only. here is all I have so far.
public Transform mouse;
private Vector3 offset;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
void follow()
{
transform.position.x = mouse.position.x;
}