In the Old Testament the continued presence of The Holy Spirit depended on obedience by the individual. In the New Testament the indwelling of the Holy Spirit depended on the obedience of Christ.
Paul In Rome
So a time was set, and on that day a large number of people came to Paul’s lodging. He explained and testified about the Kingdom