I've been trying at this for a while and I do understand why it's not working. I'm making my first simple gun and when the bullet hits the player, as in their arm or their torso then yes it does damage them, but when you hit their hat or something on their back it doesn't damage them. If someone could tell me why this is not working that'd be great, thank you!
if part then
if part.Parent:FindFirstChild("Humanoid") or part:IsA("Accessory") and part.Parent:FindFirstChild("Humanoid").Health > 0 then
part.Parent.Humanoid:TakeDamage(Damage)
end
end
