Character becomes translucent after coming back from First person

Okay so, I’m making a custom weapon system.
The players can press V to toggle First Person.

The problem is that whenever the player comes back from FPS. Their character, becomes translucent till they unequip the weapon.

After unequipping it goes back to the normal.

When I check the part’s transparency it shows 0.

I have alot of code, and not sure which one to show. So i’ll just show the part that converts to fps.

local fpsdb = true
function module.goandungofps(viewmodel,char,class)
	if reloading then return end
	if fpsdb then
		fpsdb = false
		if class == 'gofps' then
			game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
			viewmodel.Parent = game.Workspace.Camera
			module.weldwithgun(game.ReplicatedStorage[char:FindFirstChildWhichIsA("Tool").Name],viewmodel)
			module.equip(viewmodel,game.Workspace.Camera.Viewmodel[char:FindFirstChildWhichIsA("Tool").Name],game.ReplicatedStorage.GunAnimations.PistolHold,game.ReplicatedStorage.GunAnimations.PistolEquip)
		elseif class == 'ungo' then
			game.Workspace.Camera.Viewmodel[char:FindFirstChildWhichIsA("Tool").Name].Parent = game.ReplicatedStorage
			viewmodel.Parent =game.ReplicatedStorage
			game.Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic
		end
		wait(1)
		fpsdb = true
	end
end

If you’d like more code. Then please reply.

No. I’m using a viewmodel for first person.

when you zoom in with your camera there is a brief seccond where you character becomes transparent and after that invisible to yourself (like your head)
(if you stop the video at 0.04 you can see this)

after that you zoom out by resetting the camera, but becous there was no “zoom out” motion the character never got set back to non transparent