GetComponent().material.mainTexture = scareTexture;
GetComponent<AudioSource>().Stop();
GetComponent<AudioSource>().loop = false;
28- AudioClip = scareSound;
GetComponent<AudioSource>().Play();
showScare = true;
(28,25) error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
This line is totally wrong:
28- AudioClip = scareSound;
AudioClip is a class and you can’t use it like that. You should create an instance of that class and then assign it, e.g.:
AudioClip someAudio = scareSound;
As I have no idea of what you are trying to achieve I can only guess that you want to replace those lines:
28- AudioClip = scareSound;
GetComponent<AudioSource>().Play();
on those:
AudioSource asrc = GetComponent<AudioSource>();
asrc.clip = scareSound;
asrc.Play();
If that’s not the case then let me know in the comment section below elaborating on your question or update your question with more info.