As Codsworth’s last ability resolves, if the target Aura or Equipment can’t legally be attached to the target creature (for example, because the creature has protection from enchantments or protection from artifacts), the target Aura or Equipment won’t move.