Hello, I’m currently making a gun system for me to use across all my games, but ive been having some issues with making an ADS system.
The way my gun system works is it basically uses the whole R15 rig, No viewmodels, just a tool and the players character whilist adujsting the CFrame of the shoulders joints.
I tried making an “aim part” that sits on the ironsights of the gun and shifts the shoulders CFrame so that the aimparts CFrame is in line with the camera, but it didnt work how i intended it to do, i wrote to an ai to help fix this because its been a while now and it just gave me crappy code (like always)
How do i go my way to make this? Ive genuinely tried every solution i can think of.. ![]()
![]()
![]()
(heres the code for it, though the shoulders are the only ones intended to move, gen dont know what im doing anymore)
if aiming == true then
local camCF = camera.CFrame
local torsoCF = character.UpperTorso.CFrame
local aimCF = script.Parent.Handle.AimPart.CFrame
local aimToRightArm = aimCF:ToObjectSpace(character.RightUpperArm.CFrame)
local aimToLeftArm = aimCF:ToObjectSpace(character.LeftUpperArm.CFrame)
local torsoToCam = torsoCF:ToObjectSpace(camCF)
rightElbow.C0 = aimRightElbowC0
rightWrist.C0 = aimRightWristC0
leftElbow.C0 = aimLeftElbowC0
leftWrist.C0 = aimLeftWristC0
rightShoulder.C0 = (torsoToCam * aimToRightArm * rightShoulder.C1)
leftShoulder.C0 = (torsoToCam * aimToLeftArm * leftShoulder.C1)
else
rightShoulder.C0 = defaultRight
rightElbow.C0 = defaultRightElbow
rightWrist.C0 = defaultRightWrist
leftShoulder.C0 = defaultLeft
leftElbow.C0 = defaultLeftElbow
leftWrist.C0 = defaultLeftWrist
end
)
ignore some of the flaws in the animations it still isnt done ![]()