Restrict the movement of an object that is parented to another one.

So i basically have a cube attached to a longer one. Around all of this i have a room and these 2 cubes should only move in this little room. I tried to restrict the cubes movement by making collisions for the room and the cubes but they keep clipping through the walls. Anybody have a fix for this?

It sounds a bit as if you needed constraints. But the description is too vague to suggest anything tangible at the moment, hence the lack of answers I guess. There’s a dozen ways to move things in UE. How to introduce a constraint / clamp / limiter would depend on the method chosen for the movement.

Consider fleshing out the question with more info.