how do i find a script component from a script.

im looking to temporarily dissable one script on a gameobject from a diffrent script in a diffrent gameobject. how do i locate the script component from within the code?

Just use the name of the script/class you’re trying to grab. So like:

PlayerController playerScript = gameobjectThatHasIt.GetComponent<PlayerController>();
2 Likes

:open_mouth: ooooooh thank you