Trying to change CFrame angle

I’m trying to make a script that, it sets a hand view model position, and, in the same script, i want that when the player shoots, it occurs a recoil.

The problem is that, in the script, instead of changing the Y axis from the angle, it changes the Y axis from the position.

Here is the script:

local module = {}

local Camera = workspace.CurrentCamera
local Modules = game.ReplicatedStorage.Modules
local OffsetAngles = CFrame.Angles(0, 0, 0)

function module:SetHands(Hands)
	local NewHands = Hands:Clone()
	NewHands.Parent = Camera
	
	NewHands["Left Arm"].CanCollide = false
	NewHands["Right Arm"].CanCollide = false

	return NewHands
end

function module:UpdateHands(Hands)
	local Humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
	

	if Camera:FindFirstChild(Hands.Name) ~= nil then
		if Humanoid.Health == 0 then
			Camera[Hands.Name]:Destroy()
		else
			Hands["Left Arm"].CanCollide = false
			Hands["Right Arm"].CanCollide = false
			Camera[Hands.Name]:SetPrimaryPartCFrame((Camera.CFrame  * CFrame.new(.25, -2, 0.3)) * OffsetAngles)	
		end
	end
end

Modules.GunModule.Shoot.Event:Connect(function(Time)
	-- Recoil
	
	for i = 1, 5 do
		OffsetAngles += Vector3.new(0, math.rad(i), 0)
		task.wait(.02)
	end
	
	task.wait(.3)
	
	for i = 1, 5 do
		OffsetAngles += Vector3.new(0, -math.rad(i), 0)
		task.wait(.02)
	end
end)



return module

Since now, i’ve already checked if its change the orientation from any part from the hand, but no results.

For angle use CFrame.Angles instead of CFrame.new. Also, it accepts the value in rads, even tho parts store their orientation as degrees, so in case you want to convert that use the math.rad function(and for the reverse, the math.deg function).

I didn’t get it, where am i using CFrame.Angles wrong?

Camera.CFrame * CFrame.new(.25, -2, 0.3)) * OffsetAngles -- Camera * PositionOffset * AngleOffset

The OffsetAngles is a CFrame.Angles value, and that is the only part in the script that i am using CFrame.Angles

I think in this line the second argument should be in Angles, unless I’m mistaken:

This second argument it’s just a position offset, so the hand view model can be more visible.