How many ways to detect the player in a sword combat system are there?

  1. What do you want to achieve? Keep it simple and clear!
    I want to make a sword combat system but before I make it, I want to know how many ways to detect the player are there. I do not want to use any open-sourced module as long as there is a way to make it myself.

  2. What is the issue? Include screenshots / videos if possible!
    The issue is that I do not know any way to do that except of open-sourced modules and magnitude which I don’t know how to use. But I know that with magnitude I can only detect the player in a radial way.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried searching YouTube or DevForum posts but the most of them use .Touched and raycast-client cast modules.

Magnitude gets the length of a vector. Vector3’s have length and direction therefore if you get the offset between 2 vectors and magnitude that offset then you’ll get the distance between them. You can make a hitbox using GetPartsInParts() to detect a player.

Yeah, but would that help the sword detect the player when an Animation Plays? I want the sword to detect the player through the animation and yes, I do not want to use .Touched for now. I do not want to hit the player just because he is in the correct distance.

The only way to detect the player in your case is checking collision.

Consider using clientcast… A lot easier than trying to make one from scratch.

1 Like