I am working on a gun system for my game, but so far i cant figure out how to keep the right upper arm from moving. Whenever i jump the arm flies in the air and ruins the guns aim, and when im walking the gun sways back and forth, so it also ruins aim badly.\
So far i tried welding the right upper arm to the HumanoidRootPart, but the arm still moves a little bit, and it just looks weird when jumping.
If you can help out please do! Thanks!
This is what i have so far:
local rs = p.Character.RightUpperArm:WaitForChild("RightShoulder") rs.C0 = CFrame.new(1.5,.25,-.5) rs.C1 = CFrame.Angles(math.rad(-80),0,0) local gun = game.ReplicatedStorage.Pistol:Clone() gun.Parent = p.Character gun.CFrame = p.Character.RightHand.CFrame local weld = Instance.new("Weld", gun) weld.Part0 = gun weld.Part1 = p.Character.RightHand weld.C0 = CFrame.new(0,-.45,-.45)*CFrame.Angles(math.pi*1.5,math.pi,0) local weld2 = Instance.new("Weld", gun) weld2.Part0 = p.Character.RightUpperArm weld2.Part1 = p.Character.HumanoidRootPart weld2.C0 = CFrame.new(-1.5,.25,1)*CFrame.Angles(math.rad(-70),0,0)
make an animation for it that plays during the walking and idle animation where the right arms stays still. you can easily do this by reading this article on the wiki about animating, and this article on the wiki about changing default animations