Help in programming a robot

Hello, I need your help, could anyone advise or recommend me how to write a script in python? My problem is : I have a robot that uses gripper to pick up a cube and insert it into the engine. The gripper is kinematized and makes a linear motion (slides the cube into the motor). My problem is : when the gripper slides the cube into the motor it is bound to the tcp and stays suspended in the air. Could anyone advise me how to solve this problem. Sorry if i have put the question wrong. Thank you in advance for your advice

Set TCP as slider’s child node should work.


MovingTCP.vcmx (1.1 MB)