You’ll want to create a weld that’s relative to the position of Character.UpperTorso, using the VectorToWorldSpace function. See the below snippet on how to use this function.
local Players: Players = game:GetService("Players")
local tool: Tool = script.Parent
tool.Unequipped:Connect(function()
local backpack = tool.Parent
local player: Player = backpack.Parent
local character = player.Character or player.CharacterAdded:Wait()
-- create new weld
local weld = Instance.new("Weld")
weld.Parent = tool.Handle
-- delay a bit since tool hasn't finished reparenting to Backpack
wait(0.25)
tool.Parent = character.UpperTorso
-- setting these after parenting will update weld correctly in the world
local left = 0
local down = 0
local forward = 2
weld.C1 = CFrame.new(character.UpperTorso.CFrame:VectorToWorldSpace(Vector3.new(left, down, forward)))
weld.Part1 = tool.Handle
weld.Part0 = character.UpperTorso
end)
end)
I’m not sure if it’s the way I’m calculating the angle or if it’s something else.
The problem is that the CFrame.Angles function does not work in the way you are expecting. CFrame.Angles takes in three numbers, one for each axis (x, y and z). These numbers are in radians, not degrees.
So a rotation of 90 degrees around the x axis would be (1.5708, 0, 0).
The correct code would be: CFrame.new(Vector3.new(0, -0.65, 0)) * CFrame.Angles(1.5708, 0.383972, 0)