What I mean by "Touch Detection" is when something touches another thing. Say we have this script:
local Part = (Part) Part.Touched:Connect(function(hit) print(hit) end)
When a Humanoid touches the part, it prints the parts of the Humanoid. When another part touches it, that doesn't happen. Why? How do I fix it?
I've run the script myself and can confirm the programming itself is fine. That said, the .Touched event is only run when a collision occurs. If the objects seem to be touching but don't class as a collision, that's likely the issue you're experiencing. For example, creating a part and manipulating CFrames to make them overlap doesn't provide a collision, as both parts are anchored and immovable, however, throwing a tool which is not anchored on to the part will cause a collision. Put more simply, the event doesn't register the touching of anchored parts.
You got to make it detect if its a part when its touched so
script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Part") then print(hit) end end)