-- Print that runs only if debug mode is active.

local function PrintDebug(message: string)
	if FastCast.DebugLogging == true then
		print(message)
	end
end

local function FindCharacterAncestor(subject)
	if subject and subject ~= workspace then
		local targethumanoid = subject:FindFirstChildWhichIsA("Humanoid")
		if targethumanoid then
			return targethumanoid
		else
			return FindCharacterAncestor(subject.Parent)
		end
	end
	return nil
end
