What is a good method for hit detection on my sword?

That’s not true at all, I am not sure where you’re getting your information from, but just because it runs on Heartbeat it doesn’t make it “inefficient”.

Looking at the MainHandler, it’s pretty efficient and it’s just a bunch of raycasts, nothing out of the ordinary or performance heavy (as rays were designed to be light weight and using them for this is probably the best approach).
You could get up to hundreds of raycasts per frame and still run on smooth 60 FPS without any performance issues. (Client that is, I’ve tested it myself)

To OP: The reason that resource exists (Resource being: Raycast Hitbox 4.01: For all your melee needs!) is because it’s one of the best methods for hit detection when it comes to the server & melee, I have actually implemented it for my projectiles and it worked quite well and probably better than most. If you’re planning to use anything then you should use that module. From what I could see, it only starts raycasting while hitting and catches all objects depending on the attachments you provide, that’s what makes it better than most, it uses the fact that raycasting is light weight and does it pretty well.