To elaborate: the problem with consequentialism is that it creates a completely artificial and ultimately meaningless between "causes" and "consequences", as if the two were separate categories of reality. However, causes and consequences don't exist in an absolute, but only relatively to each other. Every action is a consequence of something and a cause of something else. Thus, saying that "an action is right or wrong depending on whether its consequences are right or wrong", which only amounts to shifting the question of whether its right or wrong forward, without ever providing a substantial answer. And the fun thing is, you can do this over and over, since every consequence is itself the cause to further consequences! At the end of the day, this allows consequentialists to defend the morality of basically anything.
Honestly, it is baffling that some moral philosophers still take consequentialism seriously. It should long have been thoroughly disqualified as a moral theory and subject to the same ridicule as nonsense like the ontological argument.
The ontological argument gets more crap than it deserves.
I am not a consequentialist. I like Kant but I also like virtue ethics a bit, so I'm a bit moderate hero on that stuff.