Peter replied, “Turn away from your sins and be baptized in the name of Jesus Christ. Then your sins will be forgiven, and you will receive the gift of the Holy Spirit.
When he said this, he was referring to the Holy Spirit. Those who believed in Jesus would later receive the Spirit. But at that time, the Spirit had not been given, because Jesus hadn’t been glorified yet.
“From the Father, I’m going to send you the Helper, the Spirit of truth, who comes out from the Father. When the Helper arrives, he’ll be a witness about me.
But truly I tell you, it’s for your good that I’m going away. Unless I go away, the Helper won’t come to help you. But if I do go, I’ll send him to you.