Click a button across a wall with CanCollide on?

Hi, I wanna make a invisible wall where players cant go through it but can click buttons through it (preventing users to hide the button with their characters) but I’v tried to find a way and I can’t seem to figure out how.

In the example below, the block flashes green when I click it. CanQuery does the job but I also want the wall to be collideable.
RobloxStudioBeta_WjBCYGWRW8

How can I make it possible?

3 Likes

Have you tried using collision groups yet?
I’m not very experienced with manipulating collisions but I think it would work by having different collision groups for characters and the wall

Ok you will want to use mouse.TargetFilter on the collidable wall.

You can read about target filtering here:

https://developer.roblox.com/en-us/api-reference/property/Mouse/TargetFilter

And an example is in there and also in this post: