Get angle beetween surfaces

I’ve got the angle from my player relative to the surface using this code

var groundAngle:float;
var hit:WheelHit;
if(wCollider.GetGroundHit(hit))
{
  groundAngle = Vector3.Angle(hit.normal,transform.up);
}

But how do I get the angle only in the local x axis. In other words I don’t wanna know the grounds angle relative to the gameobjects z axis only in it’s x axis

I’m not sure what you are going for here. Assuming you are looking for only the angle on the XY plane, you can do the following:

var v3 = hit.normal;
v3.z = 0;
groundAngle = Vector3.Angle(v3, transform.up);

Note that the angle is unsigned.