Part in the middle of part

This works best for now, but the biggest problem is that it checks whether the clientStructure is in the node and it doesn’t check the mouse, so now how to deal with it?

Why do you need to check for the mouse?

however, it does not have to check the mouse, which is why, as I thought, but somehow it has to check whether the object is completely in the node

If you get a solution that checks if the part is completely in the node then you don’t need to check for mouse. Even if you checked for mouse, if your mouse is inside and you rotate the part, it would be sticking out which is something you don’t want.

that’s actually right, but now the question is what to do to make node verify whether the entire model is in node

I explain how to calculate if something is within a specific area here.

Now I don’t have any problems with calculating whether I am in the zone, I just have a problem with preventing the object from leaving the zone.

For your object, get it’s bounding box. Use that to calculate all 8 corners. Your object is guaranteed to be in between those corners. Then just make sure no corners are outside of the area.