This is the description for the spell heat metal:
Choose a manufactured metal object, such as a metal weapon or a suit of heavy or medium metal armor, that you can see within range. You cause the object to glow red-hot. Any creature in physical contact with the object takes 2d8 fire damage when you cast the spell. Until the spell ends, you can use a bonus action on each of your subsequent turns to cause this damage again.
If a creature is holding or wearing the object and takes the damage from it, the creature must succeed on a Constitution saving throw or drop the object if it can. If it doesn’t drop the object, it has disadvantage on attack rolls and ability checks until the start of your next turn.
I know that a resistant or immune creature would receive only half or none of the damage from the spell, but I was wondering if the other effect of the spell does work with them.
Mechanically speaking, I didn't find anything that suggests my idea, but logically speaking, I find it feasible that creatures resistant or immune to fire damage should be affected differently by the secondary effect of the spell. I want to know about that.
So, in order to get it clear (RAW/RAI):
Are creatures that are resistant/immune to fire damage affected differently by the heat metal spell? How does the secondary effect of the spell interact with such a creature?