Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do the hands work?

How do the swaying/gun holding hands in games like phantom forces work and how are they programed, for I would like to mess around with them for a game idea I have.

1 answer

I'm actually working on the same thing, start with welding arms, I have some example code below. You use CFrame(0,0,0) * CFrame.Angles or * fromEulerAnglesXYZ(0,0,0) <-- both are the same. Basically you are welding the arms to new positions. I have yet to find out about how to make the arms sway... but start off with this!

function Equipped()
	local RArmWeld = Instance.new("Weld")
	RArmWeld.Name = "RArmWeld"
	RArmWeld.Parent = Character
	RArmWeld.Part0 = RArm
	RArmWeld.Part1 = HumRootPart
	RArmWeld.C0 = CFrame.new(-0.75, -0.4, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
	
	local LArmWeld = Instance.new("Weld")
	LArmWeld.Name = "LArmWeld"
	LArmWeld.Parent = Character
	LArmWeld.Part0 = LArm
	LArmWeld.Part1 = HumRootPart
	LArmWeld.C0 = CFrame.new(-0.35, 1.4, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
end

This discussion is preserved as it was. New answers, comments, and votes are closed.