Help with fixing grab ability

Hello, im creating a grab ability for my game and for some reason its behaving a bit buggy, basically i just use welds to weld two humanoid root parts together and play the ability animation

local weld = Instance.new("Weld")
weld.Parent = HumanoidRootPart
weld.Part0 = HumanoidRootPart
weld.Part1 =EnemyChar.HumanoidRootPart
weld.C0 = CFrame.new(0,0,-3)

and this did work perfectly in my other game, but for some reason, in this game, on players it is broken for some players but not for others, but on NPC’s when i use it, it works good, but when that npc dies and respawns it breaks

this is how the ability looks when it works good:

this is how it looks when its bugged on npc’s and on players :

i tried only welding it without anything else it was still glitching like that

Please help if i dont fix this i can’t make any grab abilities :frowning:

Try weld constraints! Normal welds break when one object moves, but welds will still work.

hello, thanks for the reply, but i tried using a weld constraints and it locks both character’s in the position how they collided, and thats not what im looking to make. i dont think the problem is in that, but i have no idea why this is happening

Assuming the logic for that code is that once a hitbox is hit the weld is created between the two parts, that would create that affect. you might have to first set the CFrame of the enemy to be a bit offseted, then weld.

This sounds like you are grabbing something that is anchored perhaps?

no i dont think any parts are being anchored in any script