function Update ()
{
transform.Find("object").GetComponent(Object_rotate).turnSpeed = 100;
}
This is calling my GameObject, called “object”.
Hierarchy like this,
- Slider - script one.
- Object_slide
- object - Object_rotate.js
And it is trying to call,
var turnSpeed = 0;
function Update () {
sPin = Time.deltaTime * turnSpeed;
transform.Rotate(Vector3.up * sPin);
}