Enable SpriteRenderer issue

Hi there this could be something simple but the issue I’m having is I’m disabling a sprite renderer in the beginning & I’m trying to enable it for the rest of the game when I press a button but for some reason it is not enabling I’ve tried everything I learned on my own but it’s not working I’m new to unity

void Start ()
{
    Ball.GetComponent<SpriteRenderer>().enabled = false;
}

void Update () 
{
    isPaused = true;
    Time.timeScale = 0;
}

public void Play ()
{
    StartMenu.SetActive(false);
    Time.timeScale = 1;
    isPaused = false;
    Ball.GetComponent<SpriteRenderer>().enabled = true;
}

Here is an example on how you can do it. Also ensure you have an EventSystem object in the scene where you have the button with the onclick action, if you don’t it won’t fire the onclick action, when you click the button. You can add the EventSystem object by clicking create in the hierarchy > UI > Event System (Redirect to... title of new-page)

    public SpriteRenderer spriteRender;

	void Start () {
		spriteRender.enabled = false;
	}
	
	public void EnableSpriteRender() {
		spriteRender.enabled = true;
	}

	// Set spriteRender.enabled to the opposite of the current state
	void ToggleSpriteRender() {
		spriteRender.enabled = !spriteRender.enabled;
	}