Assets/BallControl.js(9,9): BCE0144: 'UnityEngine.Component.rigidbody' is obsolete. Property rigidbody has been deprecated. Use GetComponent<Rigidbody>() instead. (UnityUpgradable) and Assets/BallControl.js(9,19): BCE0019: 'AddRelativeTorque' is not a member of 'UnityEngine.Component'. from this script Code (JavaScript): #pragma strict var rotationSpeed = 100; function Update () { var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed; rotation *= Time.deltaTime; rigidbody.AddRelativeTorque (Vector3.back * rotation); }
Surely this message is pretty clear. Isn't it? you need delete rigidbody and use GetComponent<Rigidbody>() instead. This will fix your other error too.
Also, Javascript itself has been deprecated for years. Whatever tutorial or sample code you're using that is having you use Javascript is hopelessly out of date and will only cause you trouble and annoyance.
Please dont start duplicate threads. You started this after already being told what this was obsolete in your other thread.
You will need to use updated tutorials on an updated version of Unity. See the learn section link at the top of this site. You can only use C#.