# script enable=false

**URL:** https://discussions.unity.com/t/script-enable-false/151276
**Category:** Questions & Answers
**Created:** [October 21, 2015, 9:54am UTC](https://discussions.unity.com/t/script-enable-false/151276 "2015-10-21T09:54:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![phatpixels](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@phatpixels](https://discussions.unity.com/u/phatpixels)
#### Post date: [October 21, 2015, 9:54am UTC](https://discussions.unity.com/t/script-enable-false/151276/1 "2015-10-21T09:54:39Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![CanCo](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@CanCo](https://discussions.unity.com/u/CanCo)
#### Post date: [October 21, 2015, 10:24am UTC](https://discussions.unity.com/t/script-enable-false/151276/2 "2015-10-21T10:24:00Z")

</div>

GameObject.SetActive(bool);

---

<div class="post-metadata">

### Author: ![LucasVmarrewyk](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@LucasVmarrewyk](https://discussions.unity.com/u/LucasVmarrewyk)
#### Post date: [October 21, 2015, 10:24am UTC](https://discussions.unity.com/t/script-enable-false/151276/3 "2015-10-21T10:24:35Z")

</div>

Hey there,

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

---

<div class="post-metadata">

### Author: ![phatpixels](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@phatpixels](https://discussions.unity.com/u/phatpixels)
#### Post date: [October 21, 2015, 10:31am UTC](https://discussions.unity.com/t/script-enable-false/151276/4 "2015-10-21T10:31:37Z")

</div>

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 🙂
