Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i keep a characters arm still when moving (like when holding a tool)?

Asked by
Nikkulaos 229 Moderation Voter
6 years ago

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)
0
For now i am disabling animations to make it more smooth Nikkulaos 229 — 6y

1 answer

Log in to vote
0
Answered by
wookey12 174
6 years ago
Edited 6 years ago

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

0
I know how to animate and stuff lol, i was just looking for an easier way of doing it than that :P Thanks tho Nikkulaos 229 — 6y
0
did this solution work? wookey12 174 — 6y
Ad

Answer this question