Hello I would like some help on making thinks invisible out of first person

I need help, im kinda new to scripting but know the basics. Im working on a fps and I need to know how to make things transparent out of first person.

made this in 2 minutes this should work

local p = game.Players.LocalPlayer
local camera = workspace.CurrentCamera

while true do --loop
	
		if (camera.focus.p - camera.CoordinateFrame.p).magnitude > 1 then -- third person
		print("woah im in third person")
		
	elseif (camera.focus.p - camera.CoordinateFrame.p).magnitude <= 1 then -- not third person
		print("woah im not in third person")

	end
	wait() -- wait trigger so this doesnt crash
end