I read up on some other posts about TargetFilter being restricted to just one instance, is it still not possible to create a table or something to contain multiple objects?
Sadly TargetFilter only accepts one instance but this also excludes its descendants.
There are a number of feature request to update how TargetFilter works but it has not been updated.
I needed this again yesterday. Please voice your support for this feature in those threads!
I support this
There generally are workarounds that you can do by parenting the parts to the same model/folder, but often this isn’t possible without rearranging everything completely
Unfortunately because tables don’t work with TargetFilter what I usually do is have a folder in the Workspace that I set as the TargetFilter, and then I put bunch of other folders inside of if for organization, and when I want to add something to the TargetFilter I just add it to one of the folders.
When I ran into this issue I converted to using this rather than Target and TargetFilter:
If you’re looking for a quick solution you could check out my custom mouse object. The target filter supports multiple unrelated objects.
This thread has been lost in time but is just as relevant today as it was TWO years ago. The RbxMouse module is an amazing wrapper but this kind of behaviour should exist by default.
I agree, I’ve ran into countless scenarios where this kind of feature would be a m a z i n g.
What I’ve found worked for me was Mr_Vgy’s method of storing the filtered objects in a folder and setting the TargetFilter to that folder.
(It works to a point but could still be much more efficient than that)
This just isn’t possible for many games that rely on hierarchy. RbxMouse solves this issue while remaining fairly lightwheight - despite this, it’s a pity in two years there’s no official improvement.
The entire Mouse instance is legacy anyway so I don’t see it getting any new updates.
I do hate advertising my own stuff but my module has support for a TargetFilter
table.
https://www.roblox.com/library/5002342379/PlayerMouse2
Where I put this module???