Detect a Mouse Hover/Target/Click with different GroupID

I’m trying to make some objects interact with mouse hover or clicks but not collidable with player, to do this i need to change the groupID from the default to a new one so the player will not collide with them.

Doing this completely destroy the whole mouse script because mouse.target/click doesn’t work with different groupIDs.

Is there a way to avoid this? i’ve heard of raycast but i’ve never scripted with that, thanks in advance for the help.

1 Like

Can you show us the script that handles the mouse hover/click please.
For raycasting please check this out
https://developer.roblox.com/en-us/articles/Raycasting