[n00b] Can not play a disabled audio source.

hello passing good samaritan,
I randomly got the ‘Cannot play disabled audio source’ error when nothing had been changed except the audio file used (audio file to trigger when player dies).
Reading around a few other threads with this same error it looks like the player (object?) is null or inactive so because the audio is part of it, it’s inactive too.
I tried changing the order of the line and a few of the solutions posted elsewhere but I’m just starting to learn code and really am not armed to solve it :confused:
any suggestions good people?
Thanks!

public IEnumerator RespawnCo()
	{
		thePlayer.gameObject.SetActive (false);

		Instantiate (deathEffect, thePlayer.transform.position, thePlayer.transform.rotation);

		thePlayer.hurtSound.Play ();

		yield return new WaitForSeconds (waitToRespawn);

		
		thePlayer.transform.position = thePlayer.respawnPosition;

		thePlayer.gameObject.SetActive (true);

Did u add using UnityEngine.Audio; namespace
Then use public AudioSource name;
Then add the audio file to the script.
I Think that might fix it if not please record what happens so I can see what the problem is.