I’m trying to use IKControl to make a gun ads system.
I’ve somewhat got it to work, however, when we look up, the ads becomes unaligned like so.
Looking down works fine.
Looking forward works fine.
Looking up becomes misaligned, and isn’t what i want, we still should be ads.
local ik_ = char.Humanoid.Animator:FindFirstChild("ik_") -- IKControl
ik_.Weight = 111
local campos = workspace.CurrentCamera.CFrame
local goal = char.HumanoidRootPart:FindFirstChild("ads_p")
goal.WorldCFrame = campos + campos.LookVector * 1.5
local gunAdsToHand = char.RightHand.CFrame:ToObjectSpace(char.gun.ads.Attachment.WorldCFrame)
ik_.EndEffectorOffset = gunAdsToHand * CFrame.Angles(math.rad(-90),0,0)