How can I get a CanQuery (false) part?

Hello, the title explains it, I want to get a part that has CanQuery set to false without having to set CanQuery to true, is there any way to do this?

1 Like

If you set a part’s CanCollide to false the CanQuery option should pop up and you can disable it from there.

You can also try to do that via console or script (part.CanQuery = false should do it) but if CanCollide is on idk if it would work

Sorry for the misunderstanding but that’s not what I’m trying to do, not have a canquery false part, but get it through functions like raycast but not raycast.

CanQuery toggles query-related methods such as Rays or Raycasts. You can’t “find” it with raycasts if it’s disabled. Why are you trying to access said part though?

As @SomeFedoraGuy said, the function of CanQuery is to litterally not let the part be detected by rays. If you want to still have a property similar to CanQuery set to false while also having it be detectable by raycasts, your best bet is to create an attribute or a tag for it and keep CanQuery on.