How do I define collision conditions but harder

how do I make a line of code in the following conditions:

  1. the camera touches a cuboid, then the cuboid moves.
  2. problem: how do I make the cuboid STOP MOVING when the camera is NOT COLLIDING WITH THE CUBOID?

Hi @James_Maxwell can you please send us your Project with remixing on, or the current code you have so we can help you? Thanks!