OK im supposed to identify the part of speech of the word in brackets...A city must be planned [carefully], or people will not want to live in it. I think it is an adverb but im not certain.

2 answers

Yes, it's an adverb. Almost all words that end in -ly are adverbs. There are few exceptions
An adverb describes a verb and this one describes how they are planning (the verb).