Confused about clamping individual relative axis velocities.

I’m not sure if i’m going in the right direction with the code below. Does anyone know if below is a good method to do this? I can’t use drag because I can’t apply drag to a direction or single axis right?

//get relative velocity
relativeV = transform.InverseTransformDirection (rigidbody.velocity);

//if its over the clamp value on the relative x axis
if (relativeV.x > clamp1.x) {

//This is the part im confused about. Does the below line make sense? I was trying to take the difference of the amount over the clamp and the clamp and set it just below the clamp.
rigidbody.velocity -= transform.TransformDirection(transform.right} * (relativeV.x-(clamp1.x-10))
}

maybe something like:

relativeV.x = clamp1.x;
rigidbody.velocity = transform.TransformDirection(relativeV);

avoiding subtracting to velocity, and I don’t get why the transform.right, this will already be in world space

Great, seems to be what I needed.

I think I wasn’t thinking of my relativeV var as something that can’t be a direction and only a speed var.