Lets say that I have a touched event:
local part = script.Parent
part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
-- do whatever
end
end)
This would work for things like body parts, but if I added an effect (lets say like a translucent part or sphere or something) and parented it to the character, then it would also think that the effect is also a body part. What is the best/most efficient way to stop this? My current solution is parenting the effect to the characters head or something, so it doesn't detect my effect as a body part.

2 comments
If hit:IsA("BasePart") then (checks whether its a part) replace BasePart with MeshPart if you use custom characters with meshes
what if my character is made of baseparts and so are my effects? and is my solution good enough?