Weld to torso not working correctly

I am making a tool that welds a part (an ankh) to a players back when used.
It works fine if i use it standing completely still, but if i move around or even turn my character in another direction it gets crooked.
image
(how i want it to look: Works if i use the tool before moving)

image
(How it looks if i move then use the tool)

Here’s my code:

local acc = game.ServerStorage.Parts.BackAnkh:Clone()
local weld = Instance.new("WeldConstraint", acc)
acc.Parent = script.Parent
acc.CFrame = torso.CFrame * CFrame.new(0,0,0.6)

acc.Orientation = acc.Orientation + Vector3.new(0,90,0)
weld.Part0 = acc
weld.Part1 = torso

Try using a motor6d or a pre made weld. Then set part 0 as humanoid and part 1 as ankh

2 Likes

replace this line with

acc.CFrame *= CFrame.Angles(0, math.rad(90), 0)

this way the 90-degree rotation is relative to the current position of the part rather than global, which is messing up your orientation

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.