Title says it all, my problem is using GetTouchingParts, but the object is non CanCollide Is there an alternate to GetTouchingParts, or is this just not possible?
This is a bit of a hacky solution, but yes, it's possible.
Per the Wiki, if the part that is not collidable has a TouchInterest, it will count as touching as if it were collidable. So you could connect an empty function for this behavior. It's worth noting that you can't call Instance.new()
to create a TouchInterest
.
Assume we had two parts A and B in workspace, where B is inside A, and B is not collidable.
workspace.B.Touched:Connect(function() end) print(#workspace.A:GetTouchingParts()) --> 1
On the other hand, there may be better solutions to the actual problem you want solved, other than doing this.
http://wiki.roblox.com/index.php?title=API:Class/BasePart/GetTouchingParts