using UnityEngine;
public class MoveObject : MonoBehaviour {
[SerializeField]
private float speed = 5f;
private void Update()
{
if (transform.position.y > 6f)
Destroy(gameObject);
transform.position += new Vector3(0, speed * Time.deltaTime, 0);
}