How can I check when two parts with can collide off touch?

So here’s what’s happening:

I have two parts, Both with can collide off, and I just need to know when they touch.
I can’t find anything about this. (I probably searched the wrong stuff.)

Any help would be awesome! Thanks!

I think you could use Collision Groups? I could be wrong here, but if both of them have collision off, you can use that so that they don’t fall off the Baseplate (Just be sure to experiment around a bit with them lol):

Touched events still fire for non collidable parts (Detecting Collisions)

So you don’t need to care about CanCollide at all.

Alrighty, Thank you both! But I’m still having problems,

One part is infront of the player at all times using :SetPrimaryPartCFrame()
And the other is constantly moving.

For some reason, it won’t tell the script the two have touched.

Are the parts anchored? If both parts are anchored then collision doesn’t fire.

I didn’t know that! I’ll unanchor them now, thank you!

1 Like

One more question, Do they both need to be anchored/cancollide off?

I think you only just need 1 part to be unanchored/collision off for the Touched event to work? Could be mistaken though

The solution is not too hard, just call this function to get the touching parts.

local function GetTouchingParts(part)
   local connection = part.Touched:Connect(function() end)
   local results = part:GetTouchingParts()
   return results

local results = GetTouchingParts(workspace.PartA)

This didn’t work for me oddly…

I just found the solution, after messing with it something worked! Thank you to everyone who helped me!

Please share what you did! I would love to hear from you as I am also facing a similar issue.

I actually don’t remember what I did here, I believe I just created two hitboxes and welded those together, I’m not sure though lol.

1 Like