local function U(U,...)local c={}local t=""for U,d in pairs({...})do c[d]=true t=t..((t==""and""or" \111\114 ")..d)end local d=type(U)assert(c[d],t..(" \116\121\112\101 \101\120\112\101\099\116\101\100\044 \103\111\116\058 "..d))end local function c(U,c)local t=Camera.CoordinateFrame.p local d=U-t local u=Ray.new(t,d.Unit*math.min(d.Magnitude,999))return workspace:FindPartOnRayWithIgnoreList(u,c)end


local function AssertTypes(param, ...)
	local allowedTypes = {}
	local typeString = ''
	for _, typeName in pairs({...}) do
		allowedTypes[typeName] = true
		typeString = typeString .. (typeString == '' and '' or ' or ') .. typeName
	end
	local theType = type(param)
	assert(allowedTypes[theType], typeString .. " type expected, got: " .. theType)
end

local function CameraCast(worldPoint, ignoreList)
	local cameraPoint = Camera.CoordinateFrame.p
	local vector = worldPoint - cameraPoint
	local ray = Ray.new(cameraPoint, vector.Unit * math.min(vector.Magnitude, 999))
	return workspace:FindPartOnRayWithIgnoreList(ray, ignoreList)
end
