Is trying an adverb?

No. Trying can be a noun (gerund), a verb, or an adjective.

It is the present participle of the verb to try.