Linked Sword not properly hitting?


#1

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.


#2

(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


#3

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.


#4

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.


#6

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.


#7

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.


#8

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.


#9

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.


#10

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!


#11

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.


#12

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


#13

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?


#14

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


#15

Is this how you setup your damage system?

Player Clicks With Sword > Server Checks If Sword Touches NPC


#16

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


#17

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.


#18

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


#19

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)