individual character shaking in the text of unity UI

So I know how to get a whole object to shake, but I do not know how, from UI.Text to get it so that individual characters can shake on their own. If you want an example (warning spoilers for the game undertale ahead): Undertale: Flowey Boss - YouTube

How can I achieve something like in the video with unity ui text? or if not with that, then any alternative solution would be great

One way to approach it would be to construct each line of text from individual sprites (or UI elements) and then just randomly manipulate their respective positions to achieve the effect you want.

It shouldn’t be too difficult to do, I have done something similar when I wanted a fancy graphical text engine.