Greetings everyone.
Currently im working on a gun system, but i’ve been experiencing a bug. Ive been searching for hours with no results, so this is my final try.
The weapon doesn’t stay centered and near the arms.
rightShoulder.C0 = CFrame.new(1,0.5,0) * CFrame.Angles(-math.asin((Mouse.Origin.p - Mouse.Hit.p).unit.y),1.55,0)
leftShoulder.C0 = CFrame.new(-1,0.5,0) * CFrame.Angles(-math.asin((Mouse.Origin.p - Mouse.Hit.p).unit.y),-1.55,0)
ToolGrip.C0 = originalToolGripC0 * CFrame.Angles(-math.asin((Mouse.Origin.p - Mouse.Hit.p).unit.y), 0, 0)
Thanks in advance.