This seemed easy enough, but I was surprised to find out how difficult and maybe not even possible it actually is to achieve. I know that you can use a body velocity and make it keep a velocity of 0 in a specific axis but I need it to be able to do that in an axis relative to the part. Here's a picture describing what I mean:
Green means that it's allowed to move in this direction/axis
Red means that it's not allowed to move in this direction/axis

3 comments
What do you mean by allow? You mean like pushing it with physics Nd only allow it to go in a certain direction forwards or backwards? Or so you want to move the part with a script?
I mean that if some force, any force tries to push the part on its x axis (relative to the part), it won't be able to. It will only allow movement of the part on its z axis (again relative to the part)
Nobody's answering so I assume that it's not possible?