generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: TargetFilter

Previous Thread :: Next Thread 
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
14 Aug 2016 02:24 PM
Dear,


So I got a script which enables you to place down models, like bricks etc. but I want to be abled to place a brick behind another brick, without changing my camera view.
I'm currently using Mouse.TargetFilter to filter the model itself, else the model would try to come closer to the mouse position each time you move it.

But my problem is that I need to filter more than that.
Since I also need to filter all bricks I placed down before.

Apparently mouse.TargetFilter = {object , PLACEDPARTSMODEL:GetChildren()} doesn't work.
(object is the part I'm currently moving)

Any ideas how I could fix this?


Greetings, Error the Chicken
Report Abuse
aIternatlveaccount is not online. aIternatlveaccount
Joined: 21 Feb 2016
Total Posts: 295
14 Aug 2016 02:27 PM
Use getasync
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
14 Aug 2016 02:29 PM
local Table = {object}
for _,v in pairs(PLACEDPARTSMODEL:GetChildren()) do
table.insert(Table, v)
end

mouse.TargetFilter = Table


Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
14 Aug 2016 02:31 PM
I'm pretty sure that's the same as what I already did?
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
14 Aug 2016 02:36 PM
it's not

your table is {object, {table}}




Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
14 Aug 2016 02:37 PM
Ok that makes sense, I'll test it
Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
14 Aug 2016 02:51 PM
So, I tried that and now it says "bad argument #3 to 'TargetFilter' (Object expected, got table)" so it needs to be 1 Object...

How will I filter multiple things if it can only be 1 object?
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
14 Aug 2016 02:56 PM
oh yes they indeed need to be in the same container, like a Folder/Model


Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
14 Aug 2016 03:04 PM
But I can't get that done, since 1 part is inside camera (because only the player itself may see this part) and all other parts are in a model
Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
14 Aug 2016 03:11 PM
Actually, I don't really care other players seeing the part I'm placing down.

I'll just make a special model for all these parts
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image