Why Isn't :GetTouchingParts() registering anything?

I was attempting to utilize something with :GetTouchingParts(), but I encountered while playing in Studio, that although the red part (seen above) is intersecting with the “slot” part, the print is showing that there are 0 touching parts.

Can anyone explain this to me?

The part needs to have CanCollide set to true or be connected to a touch event (like Touched or TouchEnded) BEFORE calling GetTouchingParts()

1 Like

If the CanCollide is false, then GetTouchingParts() will return nil.

Here’s something that may help you:

1 Like

In order for GetTouchingParts to work properly you must have a listener connected to the Touched event.

function getTouching(part)
	local signal = part.Touched:Connect(function() end)
	local touching = part:GetTouchingParts()


	return touching
1 Like