Disable Rigidbody Function Start

i have a script here that is supposed to disable the rigidbody when you press play, but the rigidbody is still enabled, help me, here is the script.

var RigidbodyScript : Rigidbody;

function Start()
{
RigidbodyScript=gameObject.GetComponent.();
RigidbodyScript.enabled = false;
}

you can’t disable rigidbodies at run time but you can stop them from detecting collisions.

rigidbody.DetectCollisions = false;

alternately you’ll need to destroy the component and add it again later.

dont forget to mark as answered :slight_smile: