Vector3 value error

Hey,

Just curious why this doesn’t work.

No error, but it’s not setting me to 2,2,0 CameraOffset

local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local debounce = false
local uis = game:GetService("UserInputService")

uis.InputBegan:Connect(function(key)
	
	if key.KeyCode == Enum.KeyCode.V then
		
		if char:FindFirstChild("GunTest") then
			
			print('found')
			
			if hum.CameraOffset == Vector3.new(2,2,0) then
				hum.CameraOffset = Vector3.new(2,2,0)
				print("setted pos to 2,2,0")
			else
				hum.CameraOffset = Vector3.new(0,0,0)
				warn("vector3 isnt 2,2,0 or resetted pos")
			end
			
		else
			
			warn('not found')
			
		end
		
	end
	
end)

I believe it should be this

if hum.CameraOffset ~= Vector3.new(2,2,0) then

else

end

What your script does now is just makes the CameraOffset 0,0,0 over and over again everytime you press V.
Also Humanoid | Roblox Creator Documentation