제가 유니티에서 잔상효과는 구현을 해놨는데 그 좌우반전이 안되네요 ㅠㅠ

using System.Collections;

using System.Collections.Generic;

using UnityEngine;


public class Ghost : MonoBehaviour

{

    public float ghostDelay;

    private float ghostDelaySecond;

    public GameObject ghost;

    public bool makeGhost = false;

    public SpriteRenderer ghostsprite;


    // Start is called before the first frame update

    void Start()

    {

        

        ghostDelaySecond = ghostDelay;

       

    }


    // Update is called once per frame

    void Update()

    {

        if (makeGhost)

        {

            if (ghostDelaySecond > 0)

            {

                ghostDelaySecond -= Time.deltaTime;

            }

            else

            {

                GameObject currnetGhost = Instantiate(ghost, transform.position, transform.rotation);

                Sprite currentSprite = GetComponent().sprite;

                currnetGhost.transform.localScale = this.transform.localScale;

                currnetGhost.GetComponent().sprite = currentSprite;

                


                ghostDelaySecond = ghostDelay;

                Destroy(currnetGhost, 1f);

            }

        }

    }

}

이렇게 구현을 했던건데 제가 이렇게 해서 안되서 
혹시나싶어서 스크립트를 하나 다시파서
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Ghostflip : MonoBehaviour
{
    private Player pl;
    private SpriteRenderer gh;

    // Start is called before the first frame update
    void Start()
    {
        pl = GetComponent();
        gh = GetComponent();
    }

    // Update is called once per frame
    void Update()
    {
        if(pl._PlayerRenderer.flipX==true)
        {
            gh.flipX = false;
        }
        if(pl._PlayerRenderer.flipX==false)
        {
            gh.flipX = true;
        }
    }
}
이렇게 했는데도 error만 발생하고 고쳐지지않네요 무엇이 문제일까요?