Maybe my phrasing was ambiguous, but you understood the opposite of what I meant, they are two separate carts. There is a lot in religion - creation myths and so on - that used to take the place of science back when there was no science as such. That part has been taking a beating from science for the Last 470 years (starting with Copernicus). But there is another part of religion that deals with moral codes, with choice and consequence, and that part cannot be substituted by science.
Another common mistake is to assume that science explains why things happen. But in fact, it only explains how they happen. Science does not attempt to answer the Big Question - "why are we here ?", unless you choose the ultimate nihilistic answer - "for no reason at all, it's all random".
I'm sorry if most of this is unclear, I didn't get much sleep Last night.
