My goal is to weld a gun to the character torso, I’ve tried tweening and playing with all the CFrame properties and welds but It still didnt work out.
Here’s what I want to achieve
But I got this instead
Basically, when player unequipped the gun all the BaseParts/MeshParts are clone (also Welded to the Handle) and grouped inside a Folder(CloneTool).
local Handle = CloneTool:FindFirstChild('Handle')
local Torso = Character:FindFirstChild('Torso')
Handle.CFrame = Torso.CFrame * CFrame.new(1, -1, 1) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(90))
local Weld = Instance.new('Weld')
Weld.Part0 = Torso
Weld.Part1 = Handle
Weld.C0 = Weld.Part0.CFrame:Inverse()
Weld.C1 = Weld.Part1.CFrame:Inverse()
Weld.Parent = CloneTool
CloneTool.Parent = Character
I’ve tried changing the value of CFrame.Angles(math.rad(90), math.rad(90), math.rad(90))
but the tool just rotates on the Y and Z axis and not X axis.
If anyone had any ideas for this problem, your help is very appreciate.