public GameObject player;
public GameObject createObj;
public Rigidbody2D rigidbody2D;
public float speed = 10f;
private void Start()
{
rigidbody2D = player.GetComponent<Rigidbody2D>();
}
private void Update()
{
rigidbody2D.velocity = new Vector2(1 * speed, rigidbody2D.velocity.y);
}
}