Trying to set the Mouse’s TargetFilter to a Folder object in Workspace will result in an error (bad cast), I would like to see Mouse.TargetFilter accept a Folder object as an ignorable
Yes please!!
It should just be able to accept any object
omg yes what ethan said
including tables
including tables[/quote]
It’s really hard for a property to accept a table because how does it replicate to other scripts and the like?
Mouse.TargetFilter is clientside which means that only the client needs to and can know about it – aren’t tables referenced by their memory location? In that case all that would need to be done would be to set TargetFilter to the memory location of that table.
Lua moves things about in memory all the time so it really isn’t plausible to do something like that.
This implies that you are putting parts in your folder, which is not what folders are for. Use a model for that.
That isn’t 100% true. If you have a folder called “Tents” filled with models of “Tent”, that would fit the purpose of folders as it’s used solely for organizational purposes and a model would be inappropriate because the tents could not be dragged about individually. Or say I have a folder called “Ignore” for all of the items my raycasts need to ignore – it would be inappropriate to use a model for that, and a folder is the better option. However, I would be unable to use the ignore folder for mouse.TargetFilter.
Lua moves things about in memory all the time so it really isn’t plausible to do something like that.[/quote]
I know this is late and whatnot but something just crossed my mind. Why does that need to replicate to other scripts in the first place? If I have a dragger and want it to ignore certain parts, I don’t want every other script ignoring those parts.
Lua moves things about in memory all the time so it really isn’t plausible to do something like that.[/quote]
I know this is late and whatnot but something just crossed my mind. Why does that need to replicate to other scripts in the first place? If I have a dragger and want it to ignore certain parts, I don’t want every other script ignoring those parts.[/quote]
To be honest, I agree. But it’s probably easier to have one global ‘mouse’ object which can be retrieved by using :GetMouse()/tools and then have all gets/sets affect that object.
Models and Folders are different objects used for different purposes. Models have inherent behaviors, folders don’t. The whole point of the Folder object is that it can contain any object and it won’t do anything to whatever you want to put in it.