Is there a way to change the orientation of a welded part without breaking the weld. My script is below and it is for a custom animated sword. It welds the HRT (HumanoidRootPart) of the sword to the handle of the tool, however, the HRT is always the same orientation as the handle. I want the HRT to be leaning back a bit so the sword looks more realistic so I added the HRT.Orientation part. When it runs it breaks the weld and the sword just falls.

function onEquipped()
	handle.CanCollide = false
	HRT.CanCollide = false
	local Weld = Instance.new("Weld", HRT)
	Weld.Part0 = handle
	Weld.Part1 = HRT
	Weld.C0 = CFrame.new()
	Weld.C1 = CFrame.new(1, -3, 0)
	UnsheathSound:play()
	HRT.Orientation = Vector3.new(0, 90, 0)
end

1 comment

0

Line 4. The parent parameter of Instance.new is deprecated, and line 9, it’s :Play() not :play().