The Artificer’s Eldritch Cannon features states, under Force Ballista:
Make a ranged spell attack, originating from the cannon, at one creature or object within 120 feet of it. On a hit, the target takes 2d8 force damage, and if the target is a creature, it is pushed up to 5 feet away from the cannon.
But what type of modifier do I use if I multiclass into Warlock? Do I use Intelligence since it is the Artificer's spell attack modifier and it's an Artificer feature, or can I also use Charisma from the warlock?
I would assume Intelligence for what I have mentioned above, but if it's unclear I can talk to my DM since I'm gonna focus on improving Charisma.
Best Answer
Use Intelligence.
The rules for attack rolls state:
(The corresponding section of the PHB adds, "as described in chapter 10".)
The Sage Advice Compendium1 further clarifies this for us in this rules question, in particular, the second footnote explaining "spellcasting ability mod":
In this case, since the feature that gave the ability to make a spell attack is an artificer feature, we use Intelligence.
It is also worth mentioning that this is consistent with the rules for ability modifiers used with spells by multiclassed spellcasters:
1 The Sage Advice Compendium is Wizards of the Coast's official compendium of rulings and rules interpretations, presented in question and answer format.