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).
But it only starts doing damage once I move or wiggle my mouse a tad.
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.
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. https://gyazo.com/c63d161f88295fad3a9580ae2a9f4484
^ I couldn’t repro this for some reason, but some people have also experienced it.
(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.
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.
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.
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!
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?
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.
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)
I also tested the whole dummy hitting thing with them and it seemed to turn out fine. https://gyazo.com/70fdec430451945cb6fd26240fd66990
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.