I use this but its says that its no the method for this context
void OnTriggerEnter ( Collider other )
{
GameObject.Find("cadena").GetComponent<PlayerMovement>.enabled=false;
}
I use this but its says that its no the method for this context
void OnTriggerEnter ( Collider other )
{
GameObject.Find("cadena").GetComponent<PlayerMovement>.enabled=false;
}
Hello @hoenheim03,
When using GetComponent (which is a function) you need to have the “()” after the type of component you are trying to retrieve:
GameObject.Find("cadena").GetComponent<PlayerMovement>().enabled = false;
Thanks now i have other problem XD
Don't hesitate to make new posts to share your bugs if you get stuck :)
– Cyber_Cats