using UnityEngine; using System.Collections; using System.Collections.Generic; public class MovingBlock : MonoBehaviour { [SerializeField] private float moveSpeed = 3f; float startingYPosition; void Start() { startingYPosition = transform.position.y; } void Update() { transform.position += Vector3.left *Time.deltaTime * moveSpeed; } }