1.) You must repent.
2.) You must be baptised
3.) Then you will receive the Holy Spirit.
To truly repent of their sins would mean that they were regenerate / saved at that time of repentance / coming to faith.
Peter clearly says, that after you repent and are baptized then you will receive the Holy Spirit . Therefore Scripture plainly shows that their is an initial external work of the Spirit in bringing someone to faith and then there is a secondary work of receiving the Holy Spirit after salvation.