OnEnable() and OnDisable() How to use OnEnable() and OnDisable() As in this example the root node script "CarRootController" controls nearly all of the other scripts it would be advisable to disable all the child scripts in case of a disabled root script. Therefore use the OnDisable() function of the "CarRootController" script: You already stored all child ids to the local array childIds so you just need to iterate over this array to disable all other scripts. Therefore we use the callback function OnDisable() which gets called by Candera automatically when disabling this script. local function OnDisable(self, id) for i, scriptId in ipairs(childIds) do Candera.SetEnabled(scriptId, false) end end If the root script gets enabled the child scripts have to get enabled too. Therefore use the OnEnable() function: local function OnEnable(self, id) for i, scriptId in ipairs(childIds) do Candera.SetEnabled(scriptId, true) end -- toggle the rotation angle of the wheels each time it got enabled self.steerLock= self.steerLock*-1 end Tip: don't forget to add the callback functions OnDisable() and OnEnable() to the public table so they can get called by Candera . If you start the execution of the script system and disable the CarRootController script during runtime also the wheels should stop rotating. Furthermore if you enable the CarRootController again, the wheels start rotating and the steering lock switches.