Can Mouse.Target ignore a part and detect the object behind?

I’m just wondering if there is a way you can use any Mouse Properties or any Ray cast technique to detect something behind an object where the mouse is.

Basically I have an invisible wall between the camera and the Object that I need to detect. I’m wondering what the best way forward would be to detect the object using the mouse. The object doesn’t need to include a click detector (Unless that’s a way of solving the problem).

The invisible wall does have a click detector in it incase that effects your solution.

Thanks for giving the time to help ~ [redacted]

Have you checked this? Lol

1 Like

Please don’t use the Mouse instance, @sjr04 provides a good alternative. PlayerMouse2 - an elegant, modern alternative to PlayerMouse

1 Like

Yeah Thanks, Idek how I just cannot find these things on my own

also is there anyway to remove the filters once placed?

Whats wrong with the Mouse Instance?

1 Like

Ah you’re fine, just be sure to look up on the API Reference from time to time

And yeah, depending on when you wanna disable just set the TargetFilter to nil I believe

Usually the Player:GetMouse() is more or less legacy based, which is why we have other alternates such as: UserInputService / Mouse Modules I believe

1 Like

Okay thanks, you’ve been a huge help

1 Like