Weapon Viewmodel reflect (Left hand)

I need the weapon model to be displayed on the X axis and the animations are not spoiled. I tried to multiply the PrimaryPart of the model by the formula as here:
Easy Camera Distortion and Manipulation (GONE WRONG) Professional edition CUSTOM SHIFTLOCK NEW || Roblox Roblox Studio - Resources / Community Tutorials - Developer Forum | Roblox
but nothing happened.

Here is video example of what I want (game - Games Unite)

EXAMPLE

1 Like

I found this script:

Can you try it?

1 Like

I don’t fully understand how to use it. I tried to clone the original model and reflect all the parts relative to original parts but it turns out weird

weapon - original weapon
cam = workspace.CurrentCamera

-- run.RenderStepped
weapon:PivotTo(cam.CFrame * some_other_cframes) 

local function GetReflectedCFrame(CF, MirrorCFrame)
	local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = MirrorCFrame:ToObjectSpace(CF):GetComponents()
	-- Reflect along X/Y plane (Z axis).
	local Reflection = CFrame.new(
		X, Y, -Z,
		-R00, R01, R02,
		-R10, R11, R12,
		R20, -R21, -R22
	)
	local ReflectedCFrame = MirrorCFrame:ToWorldSpace(Reflection)
	return ReflectedCFrame

end



local mirror_cframe = cam.CFrame * CFrame.new(0, 0, 0) * CFrame.Angles(0, math.rad(-90), 0)

local mirror_vm = cam:FindFirstChild('mirror_vm')or weapon:Clone()
mirror_vm.Parent = cam
mirror_vm.Name = 'mirror_vm'
	
for _, v in mirror_vm:GetChildren()do
	if v:IsA('BasePart')then
		if weapon:FindFirstChild(v.Name)then
			v.CFrame = GetReflectedCFrame(weapon[v.Name].CFrame, mirror_cframe)
		end
	end
end
	

for _, v in mirror_vm:GetChildren()do
	if v:IsA('BasePart')then
		if weapon:FindFirstChild(v.Name)then
			v.CFrame = GetReflectedCFrame(weapon[v.Name].CFrame, mirror_cframe)
		end
	end
end

VIDEO