How to go about Enemy AI?

When it comes to AI in roblox there doesn’t seem to be a whole lot of support out there. I’m here asking how to go about enemies in RPG games. I’m not talking about walk up to and start damaging, but a little more complex enemies like in Fantastic Frontier or DeepWoken. I don’t know how to go about this, is there a special system or workaround to handle states of these enemies, or am I just overthinking it and it’s just a pathfinding system and stopping to attack when in range?

Try looking at behavior trees:

After looking over it, the trees look like better state machines and maybe that is the way I should go, any advice on how to implement it and should I use the attached plugin or implement it myself?