Maintaining momentum while forcing 2D

Right now I have a pendulum-like swinging mechanic where if you detach from whatever you are attached to, you will continue moving in the direction of your momentum. I want this object to be able to collide against other objects while moving in this direction, but the problem is that I am using the Force2D script (found here: http://www.unifycommunity.com/wiki/index.php?title=Force2D) which manually sets the velocity for the z axis to zero (after my modification) with the following code:

Vector3 vel = body.velocity;
vel.z = 0;
body.velocity = vel;

This creates a problem. If I keep the moving body non-kinematic, its motion works the way I want it, but it won’t have the proper collision behavior. But if I make it kinematic, then it gives me an error saying that the body must be non-kinematic in order to set the body’s velocity directly.

How can I get it where it will be constrained to just 2D motion while allowing the moving object to collide off of objects?

BTW, I am using AddForce to control the manual control for side-to-side motion while attached, if that matters.

Nevermind, dumb mistake. Forgot to put a collider on the moving body.