Disable enable. Scripts, rigidbody parameters?

Can you enable and disable script and rigidbody parameters in game?

If so… Should you?

Yes, though you mean “component” and not “parameter”. Only you can answer if you should or not.

–Eric

Is there a particular way enable and disable component? Nothing is showing up in the script reference.

This doesn’t do what I want.

transform.gameObject.GetComponent(“myScript”).active=false;

Edit: starting to realise the search function doesn’t work at all for the scripting manual. Anyways I found it by getting lucky while thumbing through stuff.

GetComponent(PlayerScript).enabled = false;
GetComponent(CharacterController).enabled = false;

etc etc.