function module.SetCharVisibility(q,f,P)for C,m in pairs(q:GetDescendants())do if m:IsA("\077\101\115\104\080\097\114\116")or m:IsA("\080\097\114\116")or m:IsA("\066\097\115\101\080\097\114\116")then if f>0 then m.CollisionGroupId=3 else m.CollisionGroupId=0 end end if m:IsA("\077\101\115\104\080\097\114\116")or m:IsA("\068\101\099\097\108")or m:IsA("\080\097\114\116")and m.Name~="\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116"then m.Transparency=f end local z=nil if P~=nil then if P:IsA("\077\111\100\101\108")then z=P:GetExtentsSize()elseif P.Parent:IsA("\077\111\100\101\108")then z=P.Parent:GetExtentsSize()end end if f>0 then(game.Players:GetPlayerFromCharacter(q)).CameraMinZoomDistance=10 else(game.Players:GetPlayerFromCharacter(q)).CameraMinZoomDistance=.5 end end end return module
---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
