How to make my arms work in First Person?

Hello, So I have my Gun, but I have a trouble, I’m trying to make my gun work in First person and Third,
everything’s fine at Third Person, and the arms movement is precise and good!
Example:
https://gyazo.com/3549f5a2706fa387ead9b1df9f3e4aaf

I have fake arms, for first person, but, I’m trying to make the fake arms move according to player camera cframe while First Person

https://gyazo.com/b97082ba79b060006d8c866049fd218f
This is what happens

This is code:

Tool.Equipped:Connect(function()
	Equipped = true
	PlayAnimation('Hold')
	 MakeFakeArms()
	while (Equipped) do
		if IsFirstPerson() then
		local RightShoulder = Character:WaitForChild('Humanoid').Health > 0 and Character:WaitForChild('Torso')['Right Shoulder']
		local LeftShoulder = Character:WaitForChild('Humanoid').Health > 0 and Character:WaitForChild('Torso')['Left Shoulder']
		
		RightShoulder = Camera.CFrame
		LeftShoulder =  Camera.CFrame 
		end
	
		if IsThirdPerson() then		-- Ignore this part
		local RightShoulder = Character:WaitForChild('Humanoid').Health > 0 and Character:WaitForChild('Torso')['Right Shoulder']
		local LeftShoulder = Character:WaitForChild('Humanoid').Health > 0 and Character:WaitForChild('Torso')['Left Shoulder']
		local VectorY = CFrame.Angles(0,0,math.rad(Tool.Configurations.Arm.Value - Mouse.Y/2 * Mouse.Origin.LookVector.Y/2))
		
		RightShoulder.C0 = RightC0 * VectorY:Inverse()
		LeftShoulder.C0 = LeftC0 * VectorY
		
		end
		game:GetService('RunService').RenderStepped:Wait()
	end
end)

How I can make the arms do like this in frist person:
https://gyazo.com/7d1d60dd808fdc89056ac75abb06780e
:thinking:

1 Like

I sorted it out but doing a math.asin() function onto camera.cframe.lookvector.y