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 |
|
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 14 Aug 2016 02:36 PM |
it's not
your table is {object, {table}}
|
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 14 Aug 2016 02:56 PM |
oh yes they indeed need to be in the same container, like a Folder/Model
|
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|