I want to have my car wheels to have less sideways friction at higher speeds, how do i do this? this is the code i have so far... but it doesn't work.
var slip = 0.022 - (rigidbody.velocity.magnitude / 150);
BackRightWheel.WheelHit.sidewaysSlip = slip;
I'd change your code to:
var slip : float;
BackRightWheel.sidewaysFriction.stiffness = slip;
Also I'd clamp the slip value to make sure it never reaches 0 or some other minimum value.
To use math clamp you do this:
slip = Mathf.Clamp(slip,min,max)
slip = Mathf.Clamp(slip,0.001,0.022);
If you wanted a smooth curve instead of a linear line you can use this formula instead:
slip = 0.001 + 0.022/(rigidbody.velocity.magnitude+1)