Ways to deal damage? What's the best?

I’m making a “somewhat” isometric view game, The mouse cursor determines where the player is looking so with that, there’s no need to aim up or down. The world is flat mostly. What would be the best route to go for creating a combat system? So far all I’ve scripted is purely visual (removing walls/ceilings when players enter buildings) and I’ve made some basic models and animations for weapons like a sword, bow, and staff. It’s purely co-op and will have no PvP.

Long story short, based on this short video, what would be best for doing damage to NPCs? Would raycasting be the best? Or would a simple script activating damage when it animates and collides with an enemy be better?

1 Like

Raycasts would be accurate and performant here.

I would do it both ways and pick what I feel is best.

If you want high accuracy, try using this module. This is as accurate as you get with a melee hitbox.

Alternatively, you can create a temporary hitbox and use workspace:GetPartsInBoundBox(). More precision than just using magnitude and allows for more freedom than Raycast Hitbox.

Use ClientCast. Raycast Hitbox hasn’t been updated in 2 years It’s honestly up to you, find the one which suits best your use case / is easier to use.