sands124
|
  |
| Joined: 02 Oct 2009 |
| Total Posts: 187 |
|
|
| 10 Nov 2015 05:16 PM |
| Ok so I'm trying to get all the parts touching a no-collide brick. I've tried GetTouchingParts() but it has to be can-collide in order for it to work. I've also tried Touched() But it has to be unanchored/it has to be moving to detect the parts that it's touched in order for it to work. Is it possible to just get the parts touching the no-collide brick while it's anchored and not moving? I saw there was TouchEnded() Would I need to use that? And how would I use it? |
|
|
| Report Abuse |
|
|
sands124
|
  |
| Joined: 02 Oct 2009 |
| Total Posts: 187 |
|
|
| 10 Nov 2015 05:19 PM |
| With a TouchEnded() script I wouldn't have the script inside the part? Like I would have to remove the part right? Or I could possibly CFrame the part somewhere else randomly in the world that isn't touching any parts, which would allow me to put the script inside the part maybe? |
|
|
| Report Abuse |
|
|
FlyNormal
|
  |
| Joined: 30 Sep 2015 |
| Total Posts: 344 |
|
|
| 10 Nov 2015 05:29 PM |
| Just tested with GetTouchingParts and it's true that it does not work for non-collided parts, which is weird. Anyway one way I could think of is by recursively iterating descendants of Workspace and acquire every part's position and size. Then checking if they overlap with that part. |
|
|
| Report Abuse |
|
|
sands124
|
  |
| Joined: 02 Oct 2009 |
| Total Posts: 187 |
|
|
| 10 Nov 2015 06:02 PM |
| That seems uh pretty confusing xD I've never really done anything like that before :| I was hoping there may be a simpler way of doing it. What I'm trying to do is make the parts that are touching the no-collide part become transparent, so I clone a script that makes them transparent into the parts that are touching the no-collide part. (The no-collide part is spawned into Workspace using a tool, and the script that is supposed to find the parts that are touching it and then clone the transparent script into them is in the no-collide part.) |
|
|
| Report Abuse |
|
|