script enable=false

Hello All,
I have been looking up and down for a simple jscript to disable a script on another object.
Seems active or enabled doesnt work in function update unless im missing something which im sure might be the case as im relatively new to scripting. If someone has a hint or script i could follow for unity5 that would be great, in the meantime i’ll keep searching. Thankyou.

GameObject.SetActive(bool);

Hey there,

Have you tried: scriptName.SetActive(true); ?

seems i was doing it wrong…
this is correct js

cube.GetComponent( move2 ).enabled = false;

this didnt work

cube.GetComponent( "move2" ).enabled = false;

thankyou all for your help :slight_smile: