Linked Sword not properly hitting?

If you take a look at this gif; you can see that even when the sword is inside the dummy, it’s still not damaging for some reason. (this is when I don’t move my mouse AT ALL).
2019-02-07_06-12-34
image

But it only starts doing damage once I move or wiggle my mouse a tad.
2019-02-07_06-13-15

Anyone got any idea how do I fix this? (you’re supposed to be able to do damage on the first gif). I’m using the default linked sword. I also tried using another linked sword, the same issue happened.

Repro: repro.rbxl (566.6 KB)

edit: Tweening wasn’t the solution. The Handle is being held still by the RightGrip so the tween wouldn’t play at all.

edit: On a side note; this also happened. The swords aren’t custom, it’s the normal one.

^ I couldn’t repro this for some reason, but some people have also experienced it.

5 Likes

(I haven’t looked yet) but I’m assuming you’re using .Touched to register the damage. With the current linked sword, it changs grip position (or CFrames entirely), so that’s why it may not register, and it clips through it.

I think what can fix that is using tweening, or making up your own hitbox.

Edit: It does use .Touch

2 Likes

This is a common behaviour for “.Touched” event. It can be only executed when one of the parts is moving, thats why for example Anchored parts can not detect each other with Touched event.

You can use Tweening Service, like someonedie said.

As a workaround, you could have then player float upwards a little bit when they lunge like how the older linked swords used to work.

1 Like

Even if the Grip of the sword is changed, I’d assume something changed with Touched on the backend. LinkedSwords have always used Touched on their handles for hitboxes and have adequately been able to apply damage without needing to move. This seems like a fairly fresh problem.

Touched is honestly not reliable for hitboxes unless you use some dark magic to make them work. I’m personally having trouble with hitboxes and I can’t figure out anything concrete. I’ve been thinking of making an invisible part move around for a hitbox, but I don’t know how well that’d go.

The reason original Linked Swords used to work so well with Touched is because it added a velocity that made the character move upward, which thus created movement. When that’s removed, there’s no movement of the character, so it simply doesn’t work unless you move your character yourself.

1 Like

I was pretty active in the SFing community, and I haven’t noticed this issue; ever. The swords didn’t have any “float” either.

This issue must be very new unless it was just very subtle back then.

1 Like

Velocity was only changed when the sword entered the Lunge animation state. Velocity does not change on standard swings, which is what is being demonstrated in the OP. Velocity is also antiquated, as far as I remember, between old LocalScript swords and now. Swords without the change in velocity still worked fine while slashing without movement before.

That could just be because people who sword fight constantly are moving back and forth, or constantly moving their camera with shift lock.

A solution to this issue could be using body movers that move the character only slightly just so the Touched event can be triggered, although it’s a much less efficient solution than tweening. But, unfortunately, if tweening doesn’t work, you may have to just settle with a really diminutive body mover. As for what type of body mover, I’m not sure. I would suggest a body gyro since something like a body velocity might restrict the player’s movement.
That’s the only solution I can think of as of right now. Hopefully you can solve this problem!

Just saying, this also happened: which is the main reason why I’m very desperate to find a fix.

It’s also the normal linkedsword, no custom damage, no custom hits, etc.

Even moving the character up a slight 0.01 studs so they fall back down would fix it.

I had issues with .Touched, even with movement as your problem shows. Obviously .Touched should be registering. I decided to test out what happened if I added the listener on the server, and the rare occurrences of .Touched not working stopped happening. Are you detecting via a local script?

No, the hit isn’t being done via a localscript.

Is this how you setup your damage system?

Player Clicks With Sword > Server Checks If Sword Touches NPC

I think the hit box would be the easier idea here, as in an invisible part surrounding the entire blade of the sword.

As I said, this is the exact default linkedsword. The way it works is basically,
player clicks sword > sword grip/cframe changed > if sword touches player then do damage

Even if you don’t lunge/slash the sword, you can still be damaged if you touch the sword.

I did try that out, it didn’t make any difference.

Have you found a fix for this?

It might be caused by the Sword being non can collide which generally makes the .Touched event work a little differently.

Have you tried changing the Weld to A Motor6D and changing the CFrame for each action (lunge, slash, idle)

Hello! I’m not sure if you’ve fixed this yet, and I can’t really help as I don’t have your exact sword script. However, as a developer in the sword fighting community, I can offer you this sword used commonly among us, just in case it may help. (Not 100% sure)

Find that here: Swords

I also tested the whole dummy hitting thing with them and it seemed to turn out fine.

Be sure to choose the ‘TK’ sword if you would like players to be able to hit their own team. Also note that you may change the damage settings to your liking.

image
Tried it with your sword, I still can repro the issue.

Note that it doesn’t happen everytime, but it still could happen.

Thank you, though.