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

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
