Help with using GLFTs and raycasters

How can I change the visibility of an object when clicking it with a raycaster? To me it seems that they are quite seperate so I’ve been struggling to find a way to use them together.

If someone could have a look in the main.js file in my Github below that would be amazing, there’s a //raycaster and a //load model part, the closest I got to it working was using some kind of flag to keep track of when it gets pressed but changing the visibility never seemed to work correctly. (The object name that I want changing is called ‘About Me Notepad’ in blender.)
Thank you!!

This works for me

  if (selectedObject.name === 'About_Me_Shortcut') {
    console.log('About Me Shortcut clicked');
    scene.getObjectByName('About_Me_Notepad').visible = true
  }
  else if (selectedObject.name === 'About_Me_Notepad_Close') {
    console.log('About Me Notepad Close clicked');
    scene.getObjectByName('About_Me_Notepad').visible = scene.getObjectByName('About_Me_Notepad_Close').visible = false;
  }

btw depending on your needs you might want to look at optimising your model. 3MB and 12 drawcalls might be a bit much for such a low poly geo. Try joining objects to reduce draws.

Thank you that’s worked for me as well! I hadn’t even thought about optimising the model yet but I need to get around to it at some point, I’ll try and minimise drawcalls like you said.