---This function sets the position of the Plot

function module.SetCharVisibility(Char,Amount,Car)
	---Getting the player meshparts and decals
	for _,v in pairs(Char:GetDescendants()) do
		
		if v:IsA("MeshPart") or v:IsA("Part") or v:IsA("BasePart") then
			if Amount > 0 then
				v.CollisionGroupId = 3
			else
				v.CollisionGroupId = 0
			end
		end
		---Checking what the model is
		if v:IsA("MeshPart") or v:IsA("Decal") or v:IsA("Part") and v.Name ~= "HumanoidRootPart" then
			v.Transparency = Amount
		end
		
		---Modifying name tag
	--	local Nametag = Char.HumanoidRootPart.NameTag
		local ExtendSize = nil
		
		if Car ~= nil then
			if Car:IsA("Model") then
				ExtendSize = Car:GetExtentsSize()
			elseif Car.Parent:IsA("Model") then
				ExtendSize = Car.Parent:GetExtentsSize()
			end
		end
		
		--if ExtendSize ~= nil then
		--	if ExtendSize.Y > 8 then
		--		Nametag.ExtentsOffsetWorldSpace = Vector3.new(0,4 + ExtendSize.Y - 8, 0)
		--		Nametag.MaxDistance = 40
		--	else
		--		Nametag.ExtentsOffsetWorldSpace = Vector3.new(0,4,0)
		--		Nametag.MaxDistance = 40
		--	end
		--else
		--	Nametag.ExtentsOffsetWorldSpace = Vector3.new(0,4,0)
		--	Nametag.MaxDistance = 85
		--end
		
		---Modifying camera zoom
		if Amount > 0 then
			game.Players:GetPlayerFromCharacter(Char).CameraMinZoomDistance = 10
		else
			game.Players:GetPlayerFromCharacter(Char).CameraMinZoomDistance = 0.5
		end
	end
	
end


return module
