Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make the mouse ignore bricks?

Sorry I don't have code to accompany this. What I want is for the mouse to go past a semi-transparent part and activate a mousehoverenter script inside of a part behind it. Let me give a diagram here: Player------X----M (The dotted line is the mouse, X is the semi-transparent part, and M is the one with a mousehoverenter script in it)

1 answer

✓ Accepted answer

You can use the TargetFilter property of mouse. The TargetFilter and its descendants will be ignored when determining which part the mouse is pointing to:

local mouse = player:GetMouse() -- assuming player is defined
local toIgnore = PART/MODEL
mouse.TargetFilter = toIgnore

3 comments

0

How would you do this using a regular script?

0

This will work for server and local script, you just need to define the player. In a server script, the best way to do this is using the PlayerAdded event.

0

However I would advise against using this in a server script. It will still work, but it is poor design. See this page: http://wiki.roblox.com/index.php?title=Client-Server_Model_and_FilteringEnabled

This discussion is preserved as it was. New answers, comments, and votes are closed.