And he goes on to say, "But thanks be to God that you were slaves of sin, but you obeyed from the heart the form of doctrine to which you were delivered. And having been set free from sin, you were enslaved to righteousness (Rom 6:17-18).
Christians do not have a righteousness of our own, but Christ's righteousness is accounted to us (2Cor 5:21, Rom 3:21-22, Rom 5:17, Rom 5:19, Php 3:9).
They obeyed past tense. Paul is reminding them how they were set free from sin, and to not be entangled again.
Here us a clear command to the Roman Christians - 13 And do not present your members as instruments of unrighteousness to sin, but present yourselves to God as being alive from the dead, and your members as instruments of righteousness to God.
And verse 1 -1 What shall we say then? Shall we continue in sin that grace may abound? 2 Certainly not! How shall we who died to sin live any longer in it?
Read these words from Paul -
There is therefore now no condemnation to those who are in Christ Jesus, who do not walk according to the flesh, but according to the Spirit... Now the works of the flesh are evident, which are: adultery, fornication, uncleanness, lewdness, 20 idolatry, sorcery, hatred, contentions, jealousies, outbursts of wrath, selfish ambitions, dissensions, heresies, 21envy, murders, drunkenness, revelries, and the like; of which I tell you beforehand, just as I also told you in time past, that those who practice such things will not inherit the kingdom of God.
JLB