Also giving your whole code is often helpful in case your problem isn't where you think it is
You can just copy and paste the whole enemy script so someone helping you can see how things are related.
I've low key been trying to say that the whole code in this case is probably more useful for people trying to help you. If you're an experienced coder and you've been testing things and you know where the issue is, maybe you don't need to send the whole thing but if you haven't coded many enemies and you're aware there's a problem somewhere, it isn't too hard for us to take a look over the whole thing.
As far as I know, there isn't a discord or anything for chatting, but I think posting your code on the forum is a pretty good way to get help fairly quickly. I check the forum at least five or six times a day unless I'm on vacation, and we're pretty nice around here. While we aren't going to code your whole game for you, if you've tried a bit yourself, most everyone is more than happy to point you in the right direction. For example, "Can someone show me how to make a custom sword that shoots lasers" might not get many replies, but being like "I tried this code to make a custom sword that shoots lasers, can someone help show me where I've gone wrong" is more likely to get assistance.
One way to get much better at coding is just to keep trying. Figure out what steps are necessary to what you're trying to do, and then think about how a computer might be able to do those steps. Keep breaking it down into more steps, keep looking over the API for methods that do what you want, use the search function there, and when you've tried a couple things and things aren't working, ask. Make sure to watch Christopho's tutorials on youtube, and look at the Solarus team's code on GitHub. If there are things there you don't understand, feel free to ask.
With all that said, I just started taking a coding course at a school in my city. In two weeks, I've learned almost as much as I could teach myself over six months trying things myself. It's worth it to buy or borrow a book about coding. Even if the language the book is about isn't Lua, many concepts will be transferable.