How can I make a weld hold Part0 in place?

I’m currently drafting abilities for a game. This one ability has the player swing a flaming sword around throwing slashes. I’m cloning the sword model (a part with a special mesh) from server storage, and welding it to the right hand of the character.

The problem is, it moves both the player and the sword simultaneously. I’d like the player to stay in place but have the sword move with the animation.

Video demonstration:

Code snippet:

local sword = abilitiesAssets.Sword:Clone()
local handle = sword.Handle
local weld = Instance.new("Weld")

weld.Parent = char.RightHand
weld.Part0 = char.RightHand
weld.Part1 = handle

sword.Parent = ws
sword.CFrame = char.RightHand.CFrame

As you can see, it looks like I’m having a seizure.
Any help is appreciated, thanks.

1 Like

Maybe try this

‘’’
local sword = abilitiesAssets.Sword:Clone()

local handle = sword.Handle

sword.Parent = workspace

sword.CFrame = char.RightHand.CFrame

local weld = Instance.new(“Weld”)

weld.Parent = sword

weld.Part0 = sword

weld.Part1 = char.RightHand

weld.C0 = sword.CFrame:Inverse() * char.RightHand.CFrame

1 Like