Basically, I have been trying this thing for ages and i think it might almost be working. I’m VERY new to unity and this is one of my first projects. I keep getting errors in my script but even when i fix it there still is no change? Here is my error:
“Assets/Scripts/Pill/PillEnable.cs(33,30): error CS0119: Expression denotes a type', where a
variable’, value' or
method group’ was expected”
And here is my text:
void Update ()
{
if (Input.GetKeyUp (KeyCode.E))
Colliderr ();
if (Input.GetKeyUp (KeyCode.E))
Rendererr ();
if (Input.GetKeyUp (KeyCode.E))
FPS ();
if (Input.GetKeyUp (KeyCode.E))
Follower ();
}
void Colliderr()
{
StartCoroutine(Collider());
}
IEnumerator Collider()
{
//This is a coroutine
GetComponent<CapsuleCollider>().enabled = false;
“Here” yield return WaitForSeconds (20); //Wait one frame
GetComponent().enabled = true;
}
void Rendererr()
{
StartCoroutine(Render());
}
IEnumerator Render()
{
//This is a coroutine
GetComponent<MeshRenderer>().enabled = false;
“Here” yield return WaitForSeconds (20); //Wait one frame
GetComponent ().enabled = true;
}
void FPS()
{
StartCoroutine (FPSC ());
}
IEnumerator FPSC()
{
//This is a coroutine
GetComponent<PlayerController>().enabled = false;
“Here” yield return WaitForSeconds (20); //Wait one frame
GetComponent().enabled = true;
}
void Follower()
{
StartCoroutine (Follwer ());
}
IEnumerator Follwer()
{
//This is a coroutine
GetComponent<SphereFollower>().enabled = true;
“Here” yield return WaitForSeconds (20); //Wait one frame
GetComponent().enabled = false;
}
}
I have put the word “Here” is the lines that have the same error. Any help at all would be great!