Spell attacks and weaponCan spell attacks both have a chance of scoringscore critical hits? A spell attack can definitely score a critical hit.
https://twitter.com/jeremyecrawford/status/961396810701926401?lang=en The rule on critical hits applies to attack rolls of any sort. (Sage Advice Compendium, p. 12).
Jeremy Crawford specifically states, in the Sage Advice Compendium, addresses that often raised question about whether spell attacks can crit just like weapon attacks. What you're running into This is RAW vs. RAI and ultimately becomes a DM's discretion.related to the matter of making an attack roll from PHB page 194 in NautArch's answer.
If you look specifically at the RAW, neither Acid Splash nor Fireball are considered attacks. In the case of Fireball, Crawford also pointed this out when he said something like Uncanny Dodge doesn't work against Fireball because there's no attack component (no attack roll) to Fireball.
Uncanny Dodge is no help against a spell like fireball, since the spell doesn't include an attack.
https://twitter.com/jeremyecrawford/status/596223867191824384
Think about it like this, with those spells you're not actually attacking someone. You're taking a ball of acid or a ball of explosive fire and hurling it at a single point. If people happen to be in the place I'm hurling a potentially damaging substance and don't move it's like if someone put a grenade 5 feet away from you and you stood there. They didn't attack you. They put an item down. When it blew up you got hurt.
Eldritch Blast, on the other hand, is a spell aimed specifically at a target for the express purpose of causing damage. In a game I played once I used Acid Splash to create the acid and contain it in vials. The rogue then used the acid to burn little holes in the thatch walls and roofs of buildings we were trying to investigate. If that acid dripped on someone it would hurt, but it wasn't created for that purpose.