GetComponent issues in C#...

Hi, I’ve been following Flat Tutorials’ Car Tutorial, and it is all written in JavaScript. I can’t find much information on how I should write this in C#…

#pragma strict
	var currentFrictionValue : float;

	function Start () {
	
	}
	
	function Update () {
		var hit : WheelHit;
		transform.GetComponent (WheelCollider).GetGroundHit(hit);
		currentFrictionValue = hit.sidewaysSlip;
	}
public float currentFrictionValue;

void Start () {

}

void Update () {
    WheelHit hit;
    transform.GetComponent<WheelCollider> ().GetGroundHit (hit);
    currentFrictionValue = hit.sidewaysSlip;
}

It worked! Thanks a lot! Just had to change (hit) to (out hit) :smile: