-- check if camera is zoomed into first person

local function checkfirstperson()
	if isfirstperson == false then -- not in first person
		if ((camera.focus.p - camera.CFrame.p).magnitude <= 1) and (not character:GetAttribute("Ragdoll")) then
			enableviewmodel()
		end
	elseif ((camera.focus.p - camera.CFrame.p).magnitude > 1.1) or character:GetAttribute("Ragdoll") then
		disableviewmodel()
	end
end


